Menu Script

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Menu Script
# 1  
Menu Script

So, I need help writing a Menu script in UNIX.
First how can I use letters for the options instead of numbers?
Also, is there any templates out on the web I can use?
# 2  
I bet there are even tons of examples in this forum here. There is a search option in the menu bar above.

read input
case "${input}" in
     [aA])     echo "You pressed a";;
     [bB])     echo "You pressed b";;
     [cC])     echo "You pressed c";;
     [0-9]*)     echo "Somehow that felt like a number";;
     *)     echo "Try again";;

exit 0

# 3  
thanks for the share
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #301
Difficulty: Easy
Slackware was originally derived from the Software Linux System (SLS).
True or False?

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Gnome 3.28.3 menu item dissapears under the system menu

I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome. Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies

2. Shell Programming and Scripting

Script to call a menu script and redirect each option to a text file

Hello, I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file. For example;- In the script there are 10 options i want to design a script that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies

3. Shell Programming and Scripting

Need help in create menu with 3 sub menu using the case command

hi all i am a newbie to this is there any examples on creating a main menu with 3 sub menu main menu -> option a , b and c a menu -> option 1 ,2 and 3 b menu -> option 1 ,2 c menu -> option 1 ,2 i am getting headache as my code kept getting unexpected EOF ---------- Post... (0 Replies)
Discussion started by: chercm
0 Replies

4. Shell Programming and Scripting

Menu using shell script

Hi, I need to have a shell script for the below need. 1. Menu with one heading and 4 options. 2. the heading and 4 options are taken from a file. File entry ====== Heading1|option1|option2|option3|option4| Heading2|option1|option2|option3|option4| 3. the user entries must be captured in... (9 Replies)
Discussion started by: umastinu
9 Replies

5. Shell Programming and Scripting

Menu in Menu script issue

Problem: I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
Discussion started by: iDdraig
1 Replies

6. Shell Programming and Scripting

Bash menu script

I have a main menu quit=n while do clear echo echo "1. General system information" echo "2. Hardware utilisation information" echo "3. File management" echo "4. User information" echo "5. Information on network connectivity" echo "6. Information on processes" echo "Q.Quit" ... (3 Replies)
Discussion started by: AngelFlesh
3 Replies

7. Shell Programming and Scripting

Need help with script for menu

I'm working on a script for a basic menu with four options. The first option for the menu asks a user to put in anyone's user name and is supposed to display the user's home directory. If a user does not enter a name, then their own home directory should be displayed. The second menu option is... (0 Replies)
Discussion started by: sinjin
0 Replies

8. UNIX for Dummies Questions & Answers

Menu Script question

I am far from a unix script programmer .. Heres the problem .. I have a basic menu that calls functions.. One of the functions thats called invokes TCPDUMP The only way I know of to stop TCPDUMP is CTRL - C But of course when I do this it kills the script and takes me back out to the... (2 Replies)
Discussion started by: lanmanb4
2 Replies

9. Shell Programming and Scripting

Menu script

It's me again :) I would like to create a script that will display a 'Main Menu' which will link to other scripts in the same directory. Is it possible to have a scrolling menu and pretty colours for this? :) (9 Replies)
Discussion started by: Ypnos
9 Replies

Featured Tech Videos