![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to create a link | Shreedhar Naik | Shell Programming and Scripting | 3 | 05-22-2008 07:01 AM |
| interactive shell script to create users 10.4 | tlarkin | OS X (Apple) | 3 | 03-27-2008 03:35 PM |
| shell script to create dirs | sjajimi | Shell Programming and Scripting | 2 | 07-24-2007 07:34 AM |
| create a shell script | maykap100 | Shell Programming and Scripting | 3 | 08-31-2005 10:17 PM |
| Shell script to create local homes | Steve Adcock | Shell Programming and Scripting | 11 | 10-25-2004 04:18 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Dear all,
Greetings ! I am writing in order to pick your brains on an issue I have. If you remember in good old MS-DOS, one was able to change the autexec.bat and config.sys files so as to enable various configuration menus. I used it in order to have my PC (486 DX 66MHZ) run games with all of the available memory, or simply run WIndows (3.1.x), and sometimes I would even set a menu for each game (e.g Colonization by Sid Meyer, Worms, and Star Fighter). Now, the nice thing I remember about this menu configuration is the appearance of a BOX which you could manipulate by using the cursor arrow keys instead of typing the menu name. It was also possible to use an index, such as 1,2,3. I know that Bash (In Sun Solaris) is more powerfull than DOS (sorry mate), and should allow such menu creation. Although this does not relate to system configuration menus, I would need a trick to: 1- create such a menu 2- use BOXes 3- use the arrow keys (possibly using ASCII tables) I would appreciate any help in this direction, either in the form of: 1- algorithm 2- source code 3- or just ideas Many thanks from Da Bionic One |
|
||||
|
You can try something very simple, like:
again=1 while [ $again -eq 1 ] do echo "1 - Option A" echo "2 - Option B" echo "3 - Option C" echo "Enter your choice: \c"; read choice case $choice in 1|A) again=0;echo "one";; 2|B) again=0;echo "two";; 3|C) again=0;echo "three";; *) echo "wrong choice";; esac done User can enter 1, 2, 3, A, B, C only. Loops on menu otherwise. Hope that'll do ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|