This function simply writes to STDERR and exits with 1 which indicates to the caller there was an error.
Created
December 14, 2021 20:45
-
-
Save brennanMKE/86ce2f0f26f806b97886da8b73698c3a to your computer and use it in GitHub Desktop.
Die Shell Function
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
die() | |
{ | |
MESSAGE=$1 | |
>&2 echo "${MESSAGE}" && exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment