This is how to do it :
Before running the bash script, do a :
set -xthen run the script and it'll be tell every action that it performs.
This is especially useful when debugging logic.
After finding out what's wrong, this is how to turn it off :
set +x
Alternatively, to debug only when running this script, put the below line in the start of the script :
set -xArrivederci !!!
No comments:
Post a Comment