[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash 3.2.51, ERR traps and subshells
From: |
Chet Ramey |
Subject: |
Re: bash 3.2.51, ERR traps and subshells |
Date: |
Tue, 22 Jun 2010 21:45:12 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
On 6/22/10 3:10 PM, Andres P wrote:
>> The exit status of the command substitution will ultimately be ignored
>> because it's part of an assignment statement on the LHS of a || list, so
>> the commands run in the command substitution inherit that state.
>>
>
> Thanks, this behaviour seemed strange to me.
>
> Although eventually the outer `||' list taking precedence over contained
> subshells will seem natural in my use cases. It's more consistent.
Actually, the command substitution case was always the oddball. Explicit
subshells using (...), for instance, always behaved this way.
Chet
--
``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/