Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Pipeline question (echo hello | echo $(cat))



On Sun, 18 Jan 2009 19:36:19 -0500
Matthew Flaschen <matthew.flaschen@xxxxxxxxxx> wrote:
> > Consider that these variants do what you expect:
> > 
> >   echo hello | { echo $(cat) }
> >   echo hello | while echo $(cat); do break; done
> 
> True.  That really doesn't do much to address my question, though, which
> is whether zsh is complying with POSIX here.

My memory is that POSIX is careful not to be overprescriptive about
ordering within pipelines, e.g. it doesn't care which side, if any, is
executed in the shell, but if you want to be sure you can check; this
appears to be the place to register (free) to see the appropriate spec:

https://www.opengroup.org/online-pubs-short?DOC=9699969699&FORM=HTML

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author