#!/bin/bash
#
function menu(){
cat << EOF
d|D) show disk usages
m|M) show memory usages
s|S) show swap usages
q|Q) quit.
EOF
}
while :;do
menu
read -p "Your choice: " choice
case $choice in
d|D)
df -lh
;;
m|M)
free -m | grep "^Mem"
;;
s|S)
free -m | grep "Swap"
;;
q|Q)
break
;;
*)
echo -e " 33[32mChoose the wrong re-selection 33[0m"
continue
;;
esac
done