Skip to content

Instantly share code, notes, and snippets.

@ldotlopez
Last active September 8, 2020 10:19
Show Gist options
  • Save ldotlopez/ebf2f4c97b37e9066d3bf18575262345 to your computer and use it in GitHub Desktop.
Save ldotlopez/ebf2f4c97b37e9066d3bf18575262345 to your computer and use it in GitHub Desktop.
Unofficial bash "strict" mode
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
IFS=$'\n'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment