Skip to content

Instantly share code, notes, and snippets.

@juanje
Created December 3, 2010 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanje/727143 to your computer and use it in GitHub Desktop.
Save juanje/727143 to your computer and use it in GitHub Desktop.
This is a very simple shellscript menu.
#!/bin/bash
while [ "$#" -gt 0 ]
do
case $1 in
-h | --help)
echo "Show program help for $(basename $0)"
shift
;;
-l | --list)
echo "List the options"
shift
;;
*)
echo "Other options"
shift
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment