Debugging bash scripts
From Notes_Wiki
<yambe:breadcrumb>Shell_scripting|Shell scripting</yambe:breadcrumb>
Debugging shell scripts
Shell scripts can be debugged by calling them with -x and -v arguments such as:
bash -x a.sh
where:
- -x
- causes shell to print the commands being executed
- -v
- causes various input values to be printed as well
Refer to man bash and look for 'set' for more details