help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] behavior of -o pipefail


From: Chet Ramey
Subject: Re: [Help-bash] behavior of -o pipefail
Date: Sun, 28 Oct 2018 21:32:58 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 10/28/18 5:39 AM, Christof Warlich wrote:
> Hi,
> 
> I'm a bit surprised w.r.t. the implemented (and documented) behavior of -o
> pipefail:
> 
> Why is the last instead of the first error code in a pipe returned? 

Because that's how Bourne-style shells have always behaved, Posix
standardizes it, and there are millions of scripts that depend on it.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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