[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expr exit status
From: |
Philip Rowlands |
Subject: |
Re: expr exit status |
Date: |
Wed, 20 Jan 2010 12:29:51 +0000 (GMT) |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
On Wed, 20 Jan 2010, salih k wrote:
Now shall I explain again (sorry:))
actually the issue is rare and never happened in unix .So am curious on
this.
"never happened in unix"? Which OS and shell are you using?
Now my query is why these exit status (254 or 16) are coming during the
first run then it become correct value after rerun?and
*what does it mean by exit status 16 and 254?Whether this can do any thing
with expr or issue with *
*/dev/null etc?*
No it can't. The exit status you observe is a bug or a mistake in your
code or analysis.
Thats why am asking *whether I can use if [ $? -eq 1 -o $? -eq 2 -o $? -eq 3 ]
instead of*
*if [ $? -ne 0 ].
No; the apparent exit status greater than 255 is a bug, or a mistake in
your code or analysis.
If i should not use if [ $? -eq 1 -o $? -eq 2 -o $? -eq 3 ] then i will go
ahead with case.But the current expr is a running codew so my manager need
explanation.thats why.If expr is not stable i have to change all the places
in script which uses expr.
If it's important to explain your observed usage of expr then I'm not
sure what to suggest; maybe run the whole script under strace and check
what arguments for exit() expr is giving, which may hint at the cause of
the problem.
Cheers,
Phil
- expr exit status, salih k, 2010/01/19
- expr exit status, salih k, 2010/01/20
- Re: expr exit status, Philip Rowlands, 2010/01/20
- Re: expr exit status, salih k, 2010/01/20
- Re: expr exit status,
Philip Rowlands <=
- Re: expr exit status, salih k, 2010/01/20
- Re: expr exit status, Eric Blake, 2010/01/20
- Re: expr exit status, Eric Blake, 2010/01/20
- Re: expr exit status, salih k, 2010/01/20