/ Published in: Bash
Impletement die function for bash
Expand |
Embed | Plain Text
# $1 - the exit code # $2 $... - the message string die() { retcode=$1 shift printf >&2 "%s\n" "$@" exit $retcode }
You need to login to post a comment.
vikiyou on 03/23/11
1 person have marked this snippet as a favorite
Impletement die function for bash
# $1 - the exit code # $2 $... - the message string die() { retcode=$1 shift printf >&2 "%s\n" "$@" exit $retcode }
You need to login to post a comment.