In a bash script/shell, is there a programmatic way to determine if the set -e
flag is active?
I just need a boolean letting me know if it's on/off.
From help test
:
-o OPTION True if the shell option OPTION is enabled.
Thus:
[ -o errexit ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With