Re: Return status of command substitution with $(...) "gets lost"

2010-03-10 Thread Chet Ramey
> On the other hand, local is not specified by POSIX. What would it hurt > to redefine the exit status of local to reflect the status of any > command substitutions performed during the local assignments (short of > compatibility with zsh)? I think that would be a bad idea, and am not inclined to

Re: Return status of command substitution with $(...) "gets lost"

2010-03-10 Thread Eric Blake
On 03/10/2010 10:28 AM, Marc Herbert wrote: > Chet Ramey a écrit : >> On 3/4/10 2:36 AM, Ettelbrueck, Heiko wrote: >>> Problem: The $? variable is always 0 after that statement. (If, >>> on the other hand, I separate the declaration and the >>> definition of the variable as

Re: Return status of command substitution with $(...) "gets lost"

2010-03-10 Thread Marc Herbert
Chet Ramey a écrit : > On 3/4/10 2:36 AM, Ettelbrueck, Heiko wrote: >> Problem: The $? variable is always 0 after that statement. (If, >> on the other hand, I separate the declaration and the >> definition of the variable as shown in the example below, the >> $? vari