• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do Shell Script & shell Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >do Shell Script & shell Script (From: "Kim Hunter" <email@hidden>)
 >Re: do Shell Script & shell Script (From: Andrew Oliver <email@hidden>)
 >Re: do Shell Script & shell Script (From: Kim Hunter <email@hidden>)
 >Re: do Shell Script & shell Script (From: "Mark J. Reed" <email@hidden>)
 >Re: do Shell Script & shell Script (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: do Shell Script & shell Script
  • Next by Date: Re: How can I open attachment in Mail ?
  • Previous by thread: Re: do Shell Script & shell Script
  • Next by thread: Get filestructure in a variable
  • Index(es):
    • Date
    • Thread