bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Wladimir Sidorenko
Subject: different exit codes in $? and ${PIPESTATUS[@]}
Date: Wed, 10 Oct 2012 16:38:28 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]