Skip to content

Instantly share code, notes, and snippets.

@andresrc
Created November 16, 2015 09:16
Show Gist options
  • Save andresrc/135d1a052899aea44d33 to your computer and use it in GitHub Desktop.
Save andresrc/135d1a052899aea44d33 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Preamble
PROGNAME=$(basename $0)
function error_exit
{
echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
exit ${2:-1}
}
# Argument collection
DURATION=${1:-5}
RESULT=${2:-0}
# Perform job
sleep $DURATION
exit $RESULT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment