The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-13-2002
bionicfysh bionicfysh is offline
Registered User
  
 

Join Date: May 2002
Posts: 21
Unhappy Shell script to create a DOS-like Menutiem

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
  #2 (permalink)  
Old 06-14-2002
usfrog usfrog is offline
Registered User
  
 

Join Date: Dec 2001
Location: San Jose CA
Posts: 32
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
  #3 (permalink)  
Old 06-17-2002
bionicfysh bionicfysh is offline
Registered User
  
 

Join Date: May 2002
Posts: 21
Many thanks Usfrog,

I will try this asap !

Merci beaucoup !
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0