Debuging A Bash Script
Bash scripting provides an option to debug your script at runtime. You use “set -xv” command inside a shell script or use -xv on the command line while executing the script.
Syntax:
Example – Enable Debug in Script
You can enable debug mode by adding the set -xv option inside a shell script. This is useful to enable debugging for some parts of the script.
Now execute the script, You will find results like
Output:
Example – Enable Debugging Run Time
You can enable debug at script run time using the -xv option. For example
0 Comments
CAN FEEDBACK
Emoji