debug bash script code example
Example: 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
set -x #Just use this command to activate debugging within your code
## some code ... ##
set +x #Deactivate debugging
#Alternatively do
bash -x code.sh