[NCLUG] Oops,

Bob Proulx bob at proulx.com
Fri Feb 21 11:54:00 MST 2014


Zak Smith wrote:
> On this note, I often use "set -e" to make sure the script stops if
> there is an error.

The use of set -e is a very polarized issue.  Some people swear by
it.  Some people swear at it.  Here is a summary of it.

  http://mywiki.wooledge.org/BashFAQ/105

Personally I think it is so quirky that I can't recommend it.  I
wouldn't go so far as to say to never use it.  But it is very painful
to use in any complex script and verifying and testing with it is
difficult.  I can only recommend doing explicit error checking as
needed.

Bob


More information about the NCLUG mailing list