Re: do Shell Script & shell Script
Re: do Shell Script & shell Script
- Subject: Re: do Shell Script & shell Script
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 23 Oct 2006 12:58:06 -0400
On 10/23/06, Christopher Nebel <email@hidden> wrote:
P.S.: I still don't understand what that command is supposed to do,
but then I've never understood named pipes, either.
named pipes are just a way to pipe two programs together even if they
don't share a parent shell in common. One shell does
$ commandWithOutput > /path/to/named/pipe
and the other does
$ commandNeedingInput < /path/to/named/pipe
And the end result is the same as if you'd done
$ commandWithOutput | commandNeedingInput
The main use of the <(...) and >(...) syntax is to let you do pipelike
things with more than one pipe per command. For instance, you can run
two commands and diff their output without having to create a
temporary file:
diff <(ps xtpa) <(ps xtp7) # compare my process lists on two terminals
It's a convenient shortcut ; the shell actually creates the named
pipes and passes their filenames to the executed command for you.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden