[comp.sys.amiga] Little question about 'Run' and pipes...

hunt@boulder.Colorado.EDU (HUNT LEE CAMERON) (08/30/90)

I'm using ARP v. 1.3 with ConMan v.1.3.  I'm used to UN*X's shell piping
where one can say:

	ls -alR * | fgrep .zoo 

which will look for and print in "long" format all occurences
of ".zoo" in the current directory and all sub-directories.


Hoping to be able to accomplish the same on my Amiga, I tried this:

	dir files size all * | search STDIN .zoo

which works.  (I know that one can also say:

	search * *.zoo all quick file

which does the same same, except it returns the list *in order*
whereas dir seems to present the files as they are on the disk,
and also, alas, the files size is missing.)


BUT, I wanted to be clever and run that in the background, in UN*X:

	ls -alR * | fgrep .zoo &

HOWEVER, on the Amiga, one would expect it to be:

	run dir files size all * | search STDIN .zoo

which *doesn't* work.  It appears that the run applies only to the
"dir" command and ignores the search command.

So, I'd like to know if there's any way to get the "run" command to
include both commands of the pipe, like UN*X does.

Thanks much,


--Lee
"Nothing is more disorginized than Calvinball!" -- Calvin & Hobbes
hunt@spot.colorado.edu   ...!ncar!boulder!spot!hunt

wfh58@leah.Albany.Edu (William F. Hammond) (09/02/90)

In article <25395@boulder.Colorado.EDU> hunt@snoopy.Colorado.EDU (HUNT LEE CAMERON) writes:
>I'm using ARP v. 1.3 with ConMan v.1.3.  I'm used to UN*X's shell piping
> . . .
>BUT, I wanted to be clever and run that in the background, in UN*X:
>
>	ls -alR * | fgrep .zoo &
>HOWEVER, on the Amiga, one would expect it to be:
>	run dir files size all * | search STDIN .zoo
>which *doesn't* work.  It appears that the run applies only to the
>"dir" command and ignores the search command.

With that syntax the output from "run" (which is almost nothing) is piped
to search.  Then you get the output from "dir files size all".  (To see
this enter    run dir files size all * | search STDIN shell    .)

You'll want to use "\|" above instead of "|" so that the piping
will be done in the background shell.

The first line of output will be unpleasantly indented.  That can be fixed
with

     run dir files size all * \| search STDIN .zoo | tee | echo ""

Here the (small) stdout stream from tee goes to "echo", which swallows it,
while the stderr stream goes to the console before the console output from
the background process.

----------------------------------------------------------------------
William F. Hammond                   Dept. of Mathematics & Statistics
518-442-4625                         SUNYA, Albany, NY 12222
hammond@leah.albany.edu              wfh58@albnyvms.bitnet
----------------------------------------------------------------------