Skip to content

Instantly share code, notes, and snippets.

@alexanderankin
alexanderankin / die.sh
Created November 16, 2019 03:03
Bash Die Function
function die () {
local message=$1
[ -z "$message" ] && message="Died"
echo "$message (at ${BASH_SOURCE[1]}:${FUNCNAME[1]} line ${BASH_LINENO[0]}.)" >&2
exit 1
}