Difference between revisions of "Debugging bash scripts"

From Notes_Wiki
(Created page with "<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:...")
(No difference)

Revision as of 08:07, 5 August 2014

<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