Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Saving error return code in a pipeline
- X-seq: zsh-users 9004
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Dominic Mitchell <dom@xxxxxxxxxxxxxxxx>
- Subject: Re: Saving error return code in a pipeline
- Date: Thu, 30 Jun 2005 15:29:52 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20050630093632.GA60117@xxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Dominic Mitchell <dom@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050630093307.GA23323@DervishD> <20050630093632.GA60117@xxxxxxxxxxxxxxxxxxxx>
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