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

why does "jobs | wc" not work?



There seems to be a strange bug with the jobs command in
zsh-4.0.4.  It seems that the output of the jobs command refuses
to go into a pipe.

This works:

  $ sleep 1000 &
  [1] 6262
  $ jobs > foo
  $ wc foo
        1       5      29 foo   <--

But this does not:

  $ sleep 1000 &
  [1] 6262
  $ jobs | wc
        0       0       0       <-- ?

And also:

  $ echo `jobs`

  $

Is there a specific reason why jobs generates no output when
running in a pipe?

Note:  In pdksh and bash (as bash and sh), jobs works as I would
expect; csh and tcsh work like zsh.

Bye

Dominik ^_^  ^_^

P.S.:  Please CC me.




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