|
| Re: Capturing program return codes in a bash script? |
 |
Wed, 02 Apr 2008 17:09:07 -050 |
Bit Twister writes:
> Just repeating the warning, I have had a good return code in $? and a
> failure in standard error.
That's a bug.
--
John Hasler
john@dhh.gt.org
Dancing Horse Hill
|
| Post Reply
|
| Re: Capturing program return codes in a bash script? |
 |
Wed, 2 Apr 2008 21:46:55 +0000 |
On Wed, 02 Apr 2008 16:43:08 -0500, Ivan Marsh wrote:
>
> Grepping through an output file is how I have been doing it... which is
> prone to not being able to plan for the unknown.
>
> I figured there had to be a more standardized way of doing it.
>
> So I guess I'd have to test the application to see if it produces the $?
> and adjust accordingly.
Just repeating the warning, I have had a good return code in $? and a
failure in standard error. :(
|
| Post Reply
|
| Re: Capturing program return codes in a bash script? |
 |
Thu, 3 Apr 2008 06:45:34 +0200 |
John Hasler <john@dhh.gt.org>:
> Bit Twister writes:
> > Just repeating the warning, I have had a good return code in $? and a
> > failure in standard error.
>
> That's a bug.
Or he's mis-read the manpage's description of return values.
Not everything says "$? == 0" on success. Which process in a chain
does he want to consider the definitive result?
foo > blah | huggghh! ...
He might fiddle with wrapping parts in parens (run in subshells).
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
|
| Post Reply
|
|
|
|
|
|
|
|
|
|