[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
- different exit codes in $? and ${PIPESTATUS[@]},
Wladimir Sidorenko <=
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Andreas Schwab, 2012/10/10
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Chet Ramey, 2012/10/12
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Wladimir Sidorenko, 2012/10/12
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Eric Blake, 2012/10/12
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Chet Ramey, 2012/10/13
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Wladimir Sidorenko, 2012/10/14
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Andreas Schwab, 2012/10/14
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Wladimir Sidorenko, 2012/10/14
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Chet Ramey, 2012/10/14
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Dan Douglas, 2012/10/14