Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rzani
Created October 26, 2015 19:00
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 rzani/e4a25c8fe54dfe4d52cb to your computer and use it in GitHub Desktop.
Save rzani/e4a25c8fe54dfe4d52cb to your computer and use it in GitHub Desktop.
Shell utilities
selection=
until [ "$selection" = "0" ]; do
echo "
PROGRAM MENU
1 - Display free disk space
2 - Display free memory
0 - exit program
"
echo -n "Enter selection: "
read selection
echo ""
case $selection in
1 ) df -h ;;
2 ) free -h ;;
0 ) exit ;;
* ) echo "Please enter 1, 2, or 0"
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment