Bash error handling
From wikinotes
exitcodes and returncodes
fail on error
By default, bash continues running when errors occur. You can change this behaviour by adding the following line to your bash script (at the top).
set -e
debugging bash scripts
- Checkout bashdb: http://bashdb.sourceforge.net/
- Also see http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html