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

Re: "echo | ps -j $(:) | cat | cat | cat" runs components in different process groups



On Sun, Apr 15, 2018 at 9:23 AM, Stephane Chazelas <
stephane.chazelas@xxxxxxxxx> wrote:

>
> Also note that
>
> echo $(sleep 10) & echo started
>
> Only outputs "started" after 10 seconds.
>

I would say that's actually correct.  $(sleep 10) is *not* a background
job, it's output has to be collected before the first "echo" can run.  The
shell has no intrinsic idea that there won't be any output.


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