In a bash script/shell, is there a programmatic way to determine if the set -e flag is active?
set -e
I just need a boolean letting me know if it\'s on/off.
You can check the $- variable to see whether the e option is enabled:
$-
[[ $- =~ e ]]
From help set:
help set
The current set of flags may be found in $-.