[ale] bash question
Todd Pike
tpike at teepee-sw.com
Sun Mar 26 12:19:03 EST 2006
What about using a trap on debug?
trap 'if [ $? != 0 ] then exit ; fi' DEBUG
You might want to do something more sophisticated than just checking $?
but the above will do what you want. Remember there will be a lot of
overhead with such a trap.
todd..
On Sun, 2006-03-26 at 10:56 -0500, J. D. wrote:
> Ahh.. On re-reading your post I see you want something that does it
> automatically right? Instead of having to put it at several points in
> the script.. I got ya.
>
>
> On 3/26/06, J. D. <jdonline at gmail.com> wrote:
> I'm fairly new to bash scripting but do you think this would
> work? Use $? at the key points in the script and if it does
> not equal zero it exits the script? I think $? returns the
> exit status of the last command executed.
>
> Best regards,
>
>
> J. D.
>
>
> On 3/26/06, David Corbin <dcorbin at machturtle.com> wrote:
> On Sunday 26 March 2006 08:22 am, Geoffrey wrote:
> > David Corbin wrote:
> > > I right my share of shell scripts, and I know how
> to check for the status
> > > of one command and terminate the script.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list