[grid@node1 u01]$ cat testb2
#!/bin/bash
function diskspace {
clear
df -k
}
function whoseon {
clear
who
}
function memusage {
clear
cat /proc/meminfo
}
function menu {
clear
echo -e "\t\t\t\tSYS ADMIN MENU\n"
echo -e "\t1. display disk space"
echo -e "\t2. display logged on users"
echo -e "\t3. display memory usage"
echo -e "\t0. EXIT\n\n"
echo -en "\t\t ENTER:"
read -n 1 option
}
while [ 1 ]
do
menu
case $option in
0)
break;;
1)
diskspace;;
2)
whoseon;;
3)
memusage ;;
*)
clear
echo "SORRY";;
esac
echo -en "\n\n\t\tenter any key to CONTINUE"
read -n 1 line
done
clear