Skip to content

Instantly share code, notes, and snippets.

@daboross
Last active August 29, 2015 14:01
Show Gist options
  • Save daboross/5231c133d8628e13e479 to your computer and use it in GitHub Desktop.
Save daboross/5231c133d8628e13e479 to your computer and use it in GitHub Desktop.
main() {
local -r FUNCTION="$1"
case "$FUNCTION" in
function-1)
function_1 ;;
function-2)
function_2 ;;
function-2)
function_3 ;;
help)
echo "here is some help" ;;
?*)
echo "unknown argument '${1}'" ;;
*)
echo "plz specify command" ;;
esac
}
main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment