Created
June 18, 2020 17:55
-
-
Save pcewing/1ea5a2c02cf5db1712ac40aecc04606b to your computer and use it in GitHub Desktop.
Bash script base, useful common utilities for shell scripting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function yell () { >&2 echo "$*"; } | |
function die () { yell "$*"; exit 1; } | |
function try () { "$@" || die "Command failed: $*"; } | |
script_path="$( realpath "$0" )" | |
script_dir="$( dirname "$script_path" )" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment