debugging bash script code example
Example 1: debug shell script
set -x #Just use this command to activate debugging within your code
## some code ... ##
set +x #Deactivate debugging
#Alternatively do
bash -x code.sh
Example 2: bash debugging
set -x #Just use this command to activate debugging within your code
## some code ... ##
set +x #Deactivate debugging