Posted By

vikiyou on 03/23/11


Tagged

Bash die


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

scilec


Die function for bash


 / Published in: Bash
 

Impletement die function for bash

  1. # $1 - the exit code
  2. # $2 $... - the message string
  3. die()
  4. {
  5. retcode=$1
  6. shift
  7. printf >&2 "%s\n" "$@"
  8. exit $retcode
  9. }

Report this snippet  

You need to login to post a comment.