Debug helpers in bash
- 12 Jul 2017: Post was created (diff)
set -x
prints all variables you set, along with all commands you run. Invaluable while debugging my bash scripts.
set -e
will stop the script on any errors.
man set
will give you the rest.
If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).
Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.