%% Mike Dresser <[EMAIL PROTECTED]> writes: md> Here's a code fragment i'm trying to work on in bash
md> The problem is, $? reports the result of the last command, which md> is gzip, which will ALWAYS report 0(well, unless the hd is full or md> the moon is full), Yes. The definition of $? in the Bourne shell, since forever, is that it is the exit code of the last program invoked in a pipeline. md> Anyone have any ideas? See the PIPESTATUS variable in the bash man page. Note that this is not a standard thing, so if you use it your script may not be portable to other Bourne-like shells. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> HASMAT--HA Software Mthds & Tools "Please remain calm...I may be mad, but I am a professional." --Mad Scientist ------------------------------------------------------------------------------- These are my opinions---Nortel Networks takes no responsibility for them. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]