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: Chet Ramey
Subject: Re: implicit redirection of background within pipeline
Date: Wed, 13 Jan 2016 09:26:12 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 1/13/16 4:08 AM, Andreas Schwab wrote:
> 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

I changed bash to behave like this, which I think is the most reasonable.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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