Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Silent shell but not silent script
- X-seq: zsh-users 9364
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Mike Hernandez <sequethin@xxxxxxxxx>
- Subject: Re: Silent shell but not silent script
- Date: Fri, 2 Sep 2005 16:22:52 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <3060c23905090204302b8c1d91@xxxxxxxxxxxxxx>
- Mail-followup-to: Mike Hernandez <sequethin@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050902110911.GA158@DervishD> <3060c23905090204302b8c1d91@xxxxxxxxxxxxxx>
Hi Mike :)
* Mike Hernandez <sequethin@xxxxxxxxx> dixit:
> On 9/2/05, DervishD <zsh@xxxxxxxxxxxx> wrote:
> > Sometimes the command I have to run won't exist, so zsh will
> > issue that error. How the heck can I make zsh not to spill the error
> > message but at the same time let the command to use stderr and
> > stdout? I mean, I can silent zsh doing this:
> Why not test to see if the command exists before doing anything
> with it? Something like if [ -x $command ] ?
Because that's not enough, I'm afraid. If the command is an
script with a bangpath and the interpreter doesn't exist, the
"[[ -x command ]]" test will succeed but the execution will fail. By
the way, in that case zsh will return 127 instead of the correct 126,
although if I recall correctly, that has been dealt with in latest
CVS :?
Thanks for your suggestion :) I'm looking for something in that
line, but it's quite difficult. It has to be portable or at least
work in zsh and bash, that will cover nearly 90% of the boxes, and
that's a problem by itself.
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