- How to debug Shell Scripts

When things in your script don't go according to plan, you need to determine what exactly causes the script to fail. Bash provides extensive debugging features. The most common is to start up the subshell with the -x option, which will run the entire script in debug mode. Traces of each command plus its arguments are printed to standard output after the commands have been expanded but before they are executed.

Continue Reading...


source:http://linuxpoison.blogspot.com/2010/11/135781677512091.html