Monday, 13 June 2011

Aborting a Shell script

To exit the shell script use the option "set -e". It Exits immediately if a simple command exits with a non-zero status, unless the command that fails is part of an until or while loop, part of an if statement, part of a && or || list, or if the command's return status is being inverted using !.
Reference:
http://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin
http://ss64.com/bash/set.html

No comments:

Post a Comment