To help with debugging a script, you can use the "echo before execute" setting:
Turn on "echo before execute":
set -xTurn off "echo before execute":
set +xTurn off "echo before execute" without printing the line:
{ set +x; } 2>/dev/nullExample to turn on, then run some commands, then turn off:
set -x
command1
command2
command3
{ set +x; } 2>/dev/null