Shell script to create a DOS-like Menutiem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script to create a DOS-like Menutiem
# 1  
Old 06-13-2002
Data 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  
Old 06-14-2002
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 Smilie
# 3  
Old 06-17-2002
Many thanks Usfrog,

I will try this asap !

Merci beaucoup !
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies

2. Shell Programming and Scripting

Converting DOS Batch file to Shell Script

Hi, This is my DOS Batch file. @echo off echo "Program Name :" %0 rem echo "Next param :" %1 echo "Next param :" "Username/Password" echo "User Id :" %2 echo "User Name :" %3 echo "Request ID ... (4 Replies)
Discussion started by: Rami Reddy
4 Replies

3. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

4. Shell Programming and Scripting

Create Shell Script

Create a script to do the following : a. Poll for ctl file abc.ctl b. if the ctl file is found, then check for corresponding dat file(abc.dat) c. if dat file is not found then fail the process e. if dat file is found do file validation File Validation: a. Check the... (1 Reply)
Discussion started by: vivek1489
1 Replies

5. Shell Programming and Scripting

To Create shell script files from a shell script

Dear Unix and Linux users, Good evening to all. I'm new to this community and thank you for having an wonderful forum. Dear members i had to create almost some 300 shell script files for a particular task. I tried something like this.... #!usr/bin/sh fname=epdb_jobs for x in `cat $fname`... (3 Replies)
Discussion started by: NehaB
3 Replies

6. Shell Programming and Scripting

Need help to create shell script.

When i run the following command it shows me following o/p # prtpicl -v -c temperature-sensor | sed -n '/T_TCORE/,/:name/ p' | grep Temperature 61 Temperature 62 i want to put this command in shell script so that when i run the script it says ********************* Proc1 ... (4 Replies)
Discussion started by: fugitive
4 Replies

7. Shell Programming and Scripting

create a shell script that calls another script and and an awk script

Hi guys I have a shell script that executes sql statemets and sends the output to a file.the script takes in parameters executes sql and sends the result to an output file. #!/bin/sh echo " $2 $3 $4 $5 $6 $7 isql -w400 -U$2 -S$5 -P$3 << xxx use $4 go print"**Changes to the table... (0 Replies)
Discussion started by: magikminox
0 Replies

8. Shell Programming and Scripting

bash shell script and ms-dos

Hi... I need your help..... I would like to create a bash shell script, which it could someway to stimulate the MS DOS to accept and do the most basic commands of MS DOS... (1 Reply)
Discussion started by: space13
1 Replies

9. Shell Programming and Scripting

Converting Shell script to Dos batch files

Hi friends! I am having some simple shell script files to build postgresql database and all. Now i want to convert those scripts to dos batch scripts(to run on windows XP/2000/NT) because there is no need of unix emulation for latest release of postgresql. Please somebody help me. (1 Reply)
Discussion started by: darwinkna
1 Replies

10. SCO

how can I create a dos file in sco unix?

I want to output something to file1. And I want to see it in windows xp would you tell me how? (2 Replies)
Discussion started by: fresh
2 Replies
Login or Register to Ask a Question