[aklug] Re: bash die

From: Jeremy Austin <jhaustin@gmail.com>
Date: Wed Sep 15 2010 - 22:06:30 AKDT

On Wed, Sep 15, 2010 at 9:40 PM, Arthur Corliss
<acorliss@nevaeh-linux.org> wrote:
> Both the make & bash die() example are doing exactly that. =A0In a nutshe=
ll,
> an exit code of 0 is boolean true, and anything else is boolean false. =
=A0The
> question posed to all interested listeners is whether you want to use a
> scripting engine like make that does this by default, or whether you want=
 to
> have to explicitly add that code *for every command* in bash.

Gradually you are winning me over, Arthur. :)

Chris, is checking for failure necessary in *every* step? I write
fairly simple shell scripts, and usually check for failure in only a
few places where it's more likely. Obviously I can't predict all the
modes of failure, but it's more practical than checking every command.

In practice I usually let cron's output be my error reporting; and if
I want to ignore errors, there's nothing a grep and a 2>&1 won't fix.

<ducking>
jermudgeon
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Wed Sep 15 22:06:58 2010

This archive was generated by hypermail 2.1.8 : Wed Sep 15 2010 - 22:06:58 AKDT