3 ms·
I set failglob: `shopt -s failglob`. Makes the whole command fail if there's no matches. That combined with `set -e` which aborts the script in the event of any
by johncs 7y ago
I set failglob: `shopt -s failglob`. Makes the whole command fail if there's no matches. That combined with `set -e` which aborts the script in the event of any command failing makes me feel somewhat safe.
Indeed I add the following two lines to every bash script I write:
set -exu
shopt -s failglob
- nothrabannosir 7y agoIf you like set -e, I recommend looking at set -o pipefail.