Menu Script looping


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Menu Script looping
# 1  
Old 08-29-2010
Bug Menu Script looping

Hi , I have a menu driven script as shown below


echo ""
echo "*** 1 - option 1 " echo "*** "
echo "*** 2 - option 2 "
echo "*** 3 - option 3 "

Code:
read input1

Selecting option 1 shows another menu wherein
echo ""
echo "*** 1 - script 1 " echo "*** "
echo "*** 2 - script 2 "

Code:
read input 2

Code:
 
if  [ $input1 -eq 1 ] && [ $input2 -eq 1 ]
  then
       $script_path/$script name
       sleep 1

Code:
echo " Press [ ENTER ] to continue "

once the script is executed command prompt gets dispalyed .
I want to add something whereiin , I can continue running the second script [ ie no need to run the script again and supply parameters for running script 2 ( option 2) ]

Hope i have made provided enough clarity on what i tried to do

Pls suggest
# 2  
Old 08-29-2010
You'll have to make a loop and provide a menu option to break the loop and exit.
# 3  
Old 08-30-2010
MySQL

Hi

Thanks for the reply , any ideas how to execute that ...
running short of ideas on this
# 4  
Old 08-30-2010
What are the parameters you need to enter just once?
Could you post the whole script?
You can write it in pseudo-code, just to show the logic you want to involve.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 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

Infinite looping in script

we have one script which we use to send mail in our environment. If we are giving correct attachment script runs fine but if we give a attachment name which is not present on server then this script go to infinite loop and causing all memory to be used. could any one please suggest me what is wrong... (2 Replies)
Discussion started by: anshu ranjan
2 Replies

3. 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 MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies

4. Shell Programming and Scripting

Looping in the shell script with help of script timer.

Hello Experts- We are facing some issues in the while loop script when we use the script time to decide whether to exist from the loop or continue. Below is the script SrcExitLoop="FALSE" Src_InitialStartTime=`date +%s` Src_StartTime=`date +%s` Src_NUM_ALERTS=0 TOTAL_ALERTS=`expr <SOME... (4 Replies)
Discussion started by: Amey Joshi
4 Replies

5. Shell Programming and Scripting

trouble looping in script

I am having problem looping this script I want to give the user option to decide if they want to continue after each entry but then also loop it back to beginning so they can more to content of there testcase they just created. I fam new to scripting so loops are little tricky for me. code I... (7 Replies)
Discussion started by: andrew.p.mcderm
7 Replies

6. Shell Programming and Scripting

Looping Bash Script

Does anyone have a same of a bash script that cd to a directory and execute a cgi script then moves onto the next directory then executes another cgi ? (3 Replies)
Discussion started by: Virusbot
3 Replies

7. 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

8. Shell Programming and Scripting

Help Looping through files in Vi Script

I am trying to write a script that loops through all the files in the current directory that end in '.slg.gz' and runs a parser on each file. Here is my code: #!/bin/bash FILES_HOME = 'dirname $0' for i in $(ls $FILES_HOME/.slg.gz$);do ./run-feature-parser $(i) > OUTPUT.csv done ... (1 Reply)
Discussion started by: kssteig
1 Replies

9. Shell Programming and Scripting

Looping script with variables

If I have a file with a bunch of various numbers in one column, how can I make a script to take each number in the file and put in into a command line? Example: cat number_file 2 5 8 11 13 34 55 I need a loop to extract each of these numbers and put them into a command line... (1 Reply)
Discussion started by: jojojmac5
1 Replies

10. Shell Programming and Scripting

Looping a perl script in a shell script

I am trying to get the follow script to run in the background on the 'fly'. I can launch it via cron and it will run in the background. BUT when I launch it from the command line it will run in the foreground. I figure it has to do with the while loop I have, but I have no clue how I can run the... (8 Replies)
Discussion started by: edkung
8 Replies
Login or Register to Ask a Question