bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implicit redirection of background within pipeline


From: Andreas Schwab
Subject: Re: implicit redirection of background within pipeline
Date: Wed, 13 Jan 2016 10:08:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Martin Kealey <martin@kurahaupo.gen.nz> writes:

> What do other shells do? Ksh? Dash? Zsh?

$ ksh -c 'printf "foo1\nfoo2\n" | { (read x; echo 1: $x) & (read x; echo 2: $x) 
& }'
1: foo1
2: foo2
$ dash -c 'printf "foo1\nfoo2\n" | { (read x; echo 1: $x) & (read x; echo 2: 
$x) & }'
1:
2:
$ zsh -c 'printf "foo1\nfoo2\n" | { (read x; echo 1: $x) & (read x; echo 2: $x) 
& }'
1: foo1
2: foo2
$ bash -c 'printf "foo1\nfoo2\n" | { (read x; echo 1: $x) & (read x; echo 2: 
$x) & }'
1:
2: foo1

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]