Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Saving error return code in a pipeline



    Hi Dominic :)

 * Dominic Mitchell <dom@xxxxxxxxxxxxxxxx> dixit:
> On Thu, Jun 30, 2005 at 11:33:07AM +0200, DervishD wrote:
> >     Is there any better solution than this?:
> >     script.install >(tee install.log) 2>&1
> Try looking at the pipestatus array.  It contains all the exit codes
> from the last pipeline.  So you should be able to get the code you want
> by examining $pipestatus[1].

    I completely forgot about pipestatus, and the worst part is that
I already use pipestatus in one of my scripts... Oh, my.

    Thanks a lot :)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...



Messages sorted by: Reverse Date, Date, Thread, Author