how to debug the shell 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