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

`jobs' builtin does not work with pipe in scripts



Compare the following two commands:
    sleep 1s & sleep 1s & jobs -p | while read line ; do echo $line ; done
and
    zsh -c 'sleep 1s & sleep 1s & jobs -p | while read line ; do echo $line ; done'
. First command (in interactive shell) works just fine and prints output of 
`jobs'. Second command prints nothing, while `jobs -p' without pipe works just 
fine (but is useless for me). How can this be fixed?

zsh-4.3.10-r2 (USE: doc, examples, gdbm, maildir, pcre, unicode), gentoo, amd64.

Attachment: signature.asc
Description: This is a digitally signed message part.



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