#!/bin/sh
#======================================================
# Example for a simple menu script
#======================================================
#======================================================
# Main
#======================================================

while true
do
clear
cat << EOT
A Simple Menu
------------------------------------------------------------------------------
                  	[1] list the directory content
               	    	[2] print time and date
			[3] print user name
			[4] print directory name

		    [H] Help    [Q] Quit

------------------------------------------------------------------------------
EOT
echo "Type 1-4, or option -> \c"
read choice
	case $choice in
    		1) clear
		   echo "Directory Listing:"
		   ls
                   read dummy;;
    		2) clear
		   echo "Time and Date:"
		   date
                   read dummy;;
		3) clear
 		   echo "Username:"
     		   whoami
                   read dummy;;
		4) clear
		   echo "Present Working Directory:"
		   pwd
                   read dummy;;
	      [qQ]*) exit 0 ;;
	      [hH]*) clear
		     echo "help is not available"
                     read dummy;;
                *) clear
		   echo "unknown option" 
                   read dummy;;
	esac
done