Does anyone know if we can say set +x in bash without it being printed:
set +x
set -x command set +x
traces
+ command
You can use a subshell. Upon exiting the subshell, the setting to x will be lost:
x
( set -x ; command )