My question is best explained with an example.
set -x or set -v "turn on" features
set +x or set +v "turn off" features
But if my script calls another script or shell function, in that other script/function, how do I get the status of these settings. e.g.,
# In called script/function
# <save status of "set">
set -abcdef
# do stuff
# <restore status of "set">
Thanks!
$-parameter contains a set of single-letter option flags (tryecho $-; it producedhimBHfor me).