Skip to content

Instantly share code, notes, and snippets.

@tomeightyeight
Created July 18, 2018 10:34
Show Gist options
  • Save tomeightyeight/a0fc7fec0d7d093c022b65eedf5f43ac to your computer and use it in GitHub Desktop.
Save tomeightyeight/a0fc7fec0d7d093c022b65eedf5f43ac to your computer and use it in GitHub Desktop.
Bash Fail Loud
#!/bin/bash
set -uo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
IFS=$'\n\t'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment