Re: different exit codes in $? and ${PIPESTATUS[@]}

2012-10-12 Thread Wladimir Sidorenko
Ok, thanks. I'll notice this for the future. It's of course arguable, whether PIPESTATUS stores a true value, since the '!' inversion keyword gets ignored in this case. But if it was intended, than it's ok. 2012/10/13 Chet Ramey : > On 10/10/12 10:38 AM, Wladimir

Re: different exit codes in $? and ${PIPESTATUS[@]}

2012-10-14 Thread Wladimir Sidorenko
> What do you think should happen in the following case? > ! exit 1 | exit 2 | exit 3 To my mind the '!' operator should have had a higher precedence during parsing command line arguments than the pipe and applied only to the command it was immediately preceding. So that in ! command1 | command2

Re: different exit codes in $? and ${PIPESTATUS[@]}

2012-10-14 Thread Wladimir Sidorenko
Provided '-o pipefail' is not specified. 2012/10/14 Andreas Schwab : > Wladimir Sidorenko writes: > >> To my mind the '!' operator should have had a higher precedence during >> parsing command line arguments than the pipe and applied only to the >> c