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: Mon, 29 Oct 2018 14:17:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 10/29/18 9:45 AM, Chet Ramey wrote:
> On 10/29/18 3:14 AM, Christof Warlich wrote:
>>> Because that's how Bourne-style shells have always behaved,
>>  
>> But the standard (Bourne) shell doesn't even seem to support -o pipefail:
> 
> You asked about returning the last exit status in the pipeline. That's
> what the Bourne shell has always done.

My bad, I took another look at your message. The reason that pipefail
makes the rightmost non-zero exit status the status of the pipeline is
also historical. It's what ksh93 did, and therefore what the folks
involved in a discussion about multiple implementations of pipefail
converged on. This happened back in mid-2001, as part of a series of
messages about features to propose to Posix for standardization.

-- 
``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]