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:...")
 
m
 
Line 1: Line 1:
<yambe:breadcrumb>Shell_scripting|Shell scripting</yambe:breadcrumb>
[[Main_Page|Home]] > [[Shell scripting]] > [[Debugging bash scripts]]
=Debugging shell scripts=


Shell scripts can be debugged by calling them with -x and -v arguments such as:
Shell scripts can be debugged by calling them with -x and -v arguments such as:
Line 11: Line 10:


Refer to man bash and look for 'set' for more details
Refer to man bash and look for 'set' for more details
[[Main_Page|Home]] > [[Shell scripting]] > [[Debugging bash scripts]]

Latest revision as of 13:36, 7 April 2022

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



Home > Shell scripting > Debugging bash scripts