Dear all,
After running the following command:
$ ! test 0 -eq 0
I can see different exit codes in $? and ${PIPESTATUS[@]}. Here, what I get
$ ! test 1 -eq 0 ; echo $? ${PIPESTATUS[@]}
0 1
$ ! test 0 -eq 0 ; echo $? ${PIPESTATUS[@]}
1 0
I'd like to know whether that's a desired behavior or a bug.
I'm using GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu) on
Linux helios 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux
With kind regards,
Vladimir