3 ms·
Note that this can be shortened to "-e" and "-u": #!/... set -eu # ... Main part of your script ...
by vog 11y ago
Note that this can be shortened to "-e" and "-u":
#!/...
set -eu
# ... Main part of your script ...
- wyldfire 11y agoI'd used "set -e" and "set -u" before, but I had never seen it written as "-o nounset" and "-o errexit". The latter makes it clearer exactly what features are being enabled, and it's a bit of a false economy to try and "shorten" the script like this.