The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-17-2008
amatuer_lee_3 amatuer_lee_3 is offline
Registered User
 

Join Date: May 2008
Posts: 53
a main menu option?

I have created a main menu in the following way:
Code:
while true; do
	echo " "        
	echo "Main Menu: "
	echo "Please Select An Option Using The Options Provided."
	echo " "        
	echo "1 - Search All Files"
	echo " "        
	echo "2 - Search Individual Files"
        echo " "
        echo "q - Quit"
        echo " "
        echo "Please enter your option: "
        read CHOSEN_KEY
        case $CHOSEN_KEY in
                1)      echo " " 
			echo "Thank You For Selecting Search All Files"
                        break;;
                2)      echo " "
			echo "Thank You For Selecting Individual Search"
                        break;;
                q)      echo " "
			echo "Goodbye"
                        exit;;
        esac
done
What i want to know is, if the user selects option 2 how do i get the code to redirect to another path. I know it is something to do with the break after option 2 is selected but what to i type to make the code go somewhere else?
Reply With Quote
Forum Sponsor