#!/bin/ksh
# menu
# Sample shell script to display a simple user interface menu
#

clear

# The pause function will echo to the screen "Hit and key to continue" and
# after a key is hit will clear the screen and return.

pause()
{
echo
echo "Hit any key to continue"
read answer
clear
}

while  :          # Loop forever
do 
   echo
   echo
   echo '                       1) Date'
   echo '                       2) Processes Running'
   echo '                       3) List Files'
   echo '                       q) Quit'
   echo
   echo '                       Please Enter Your Choice: \c'

   read answer
   echo

   case $answer in

   1) date
      pause   
   ;;
   2) ps 
      pause   
   ;;
   3) ls 
      pause
   ;;
   q) exit 
   ;;
   *) echo 'Invalid Key'
   esac
done
