Debugging bash scripts
From Notes_Wiki
Home > Shell scripting > Debugging bash 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