Search This Blog

2013-07-09

Shell Debugging

There are a few ways to debug bash/shell scripts.

Run them with -x
bash -x $scriptname
sh -x $scriptname

Set -x inside the script
set -x
To turn off debugging later
set +x

http://wiki.bash-hackers.org/scripting/debuggingtips
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html

No comments:

Post a Comment