![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| My menu function | amatuer_lee_3 | Shell Programming and Scripting | 6 | 05-17-2008 07:19 PM |
| how to write a wrapper c code to return uid using getuid() function | pwd | High Level Programming | 4 | 05-13-2008 07:01 AM |
| PHP function kills my code? | l008com | Shell Programming and Scripting | 10 | 12-15-2003 09:02 PM |
| Menu function stuck in a loop? | darthur | UNIX for Dummies Questions & Answers | 2 | 12-14-2001 01:16 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
My menu function [new code -revised]
Below is my menu options code. It allows user to pick one of two option. I can get the first option to work, because if it is selected it just "breaks" and carries on with the script.
What i want to know is if a user selects option two how do i get that option to ignore all the other script and go to another specific part to carry out other commands??? ( i have indicated the problem by putting ########) 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 - Idex Page Information"
echo " "
echo "Q - Quit"
echo " "
echo "Please enter your option: "
read CHOSEN_KEY
case $CHOSEN_KEY in
[1]) echo " "
echo "You Have Selected To Search All Files For Hits"
break;; # By using break i carry on my script which works correctly.
[2]) echo " "
echo "You Have Selected To Access Index Page Information"
######;;
Q|q) echo " "
echo "Goodbye"
exit;;
esac
done
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Quote:
Quote:
|
|
#3
|
|||
|
|||
|
Quote:
a main menu option? amatuer_lee_3: if the earlier replies you get are not understandable, please ask about the parts you don't understand, rather than start new mutant threads. |
|
#4
|
|||
|
|||
|
Last edited by Franklin52; 05-18-2008 at 04:11 AM. |
|||
| Google The UNIX and Linux Forums |