Skip to content

Instantly share code, notes, and snippets.

@Snawoot
Created March 13, 2013 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Snawoot/5150106 to your computer and use it in GitHub Desktop.
Save Snawoot/5150106 to your computer and use it in GitHub Desktop.
while getopts ":c::i::f::m::e::t::w:h" opt; do
case $opt in
f) FILE="$OPTARG" ;;
m) MSG="$OPTARG" ;;
e) EXIT="$OPTARG" ;;
t) TYPE="$OPTARG" ;;
w) ERR_LIMIT_W="$OPTARG" ;;
c) ERR_LIMIT_C="$OPTARG" ;;
i) INTERVAL="$OPTARG" ;;
h) usage; exit 0 ;;
\?) echo "Invalid option: -$OPTARG" >&2 ; exit 1 ;;
:) echo "Option -$OPTARG requires an argument." ; exit 1 ;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment