#!/usr/bin/ksh
################################################################
# #
# #
# MENU BASED SCRIPT FORMAT - Uses select/case statements #
# #
# #
################################################################
PS3="Which option would you like to select (type number of option)?:"
clear
print "Which option would you like to select (type number of option)?:"
select option_number in option1 option2 option3 option4 quit
do
case $option_number in
option1)
echo "you have selected $option_number"
;;
option2)
echo "you have selected $option_number"
;;
option3)
echo "you have selected $option_number"
;;
option4)
echo "you have selected $option_number"
;;
quit)
print "You have selected to quit. Good Bye!"
exit ;;
*)
print "Invalid"
;;
esac
done
exit
Tuesday, January 8, 2008
Script - Menu based script format
Labels:
Shell script format
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment