Shlomi Fish <[EMAIL PROTECTED]> writes: > On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > > > Shlomi Fish wrote on 2003-10-12: > > > > > I want that if one of the (first) components of the pipeline exits with an > > > error code, I'll know about it somehow. How? > > > > > info bash --index PIPESTATUS > > > > Cool thanks.
Depending on your needs you may also use the -e option to the shell (should work for most Bourne shell and csh descendants), the option will make the shell exit if any of the commands in the pipeline fails. $ true | false | true $ echo $? 0 $ bash -e "true | false | true" true | false | true: true | false | true: No such file or directory $ echo $? 1 -- Oleg Goldshmidt | [EMAIL PROTECTED] ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]