yell() { echo "$0: $*" >&2; }
die() { yell "$*"; exit 111; }
try() { "$@" || die "cannot $*"; }
scriptdir() { (cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd) }
Created
October 28, 2015 17:35
-
-
Save darrend/3479e70eaa680b9ae10e to your computer and use it in GitHub Desktop.
bash tricks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment