[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: different exit codes in $? and ${PIPESTATUS[@]}
From: |
Chet Ramey |
Subject: |
Re: different exit codes in $? and ${PIPESTATUS[@]} |
Date: |
Sun, 14 Oct 2012 12:10:15 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
On 10/14/12 4:46 AM, Wladimir Sidorenko wrote:
>> 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.
You're free to feel that way, but existing shells don't implement it like
that, and Posix doesn't agree with you.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: different exit codes in $? and ${PIPESTATUS[@]}, (continued)
- 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
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Chet Ramey, 2012/10/14
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Dan Douglas, 2012/10/15
- Re: different exit codes in $? and ${PIPESTATUS[@]}, Chet Ramey, 2012/10/15
- Re: different exit codes in $? and ${PIPESTATUS[@]},
Chet Ramey <=