Make my script press buttons


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Make my script press buttons
# 8  
Old 12-12-2007
Quote:
Originally Posted by Zelp
This does display my options again for me, but how do I get out of the big loop now?
Have another flag, instead of "while true" have "while test "$RUNNING" = "1"" or similar.... set the flag beforehand, and set it to zero when you want to exit.

Or, depending on your script, you could really call exit, and if you had cleaning up to do, put it in a trap 0 function.
# 9  
Old 12-12-2007
wow, I guess these 10 hour days are getting me, I missed the simple use of a while loop.

thanks so much porter

Code:
while test $RUN = 1
...
      "Exit") RUN=0
              clear
              break;;

Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to detect key press in cgi shell script?

I want to detect key pressed in my .cgi web page, but it does not work even I found the code in other web site. My code is : #!/bin/sh #================================================= # PATH defination # ================================================... (2 Replies)
Discussion started by: Shuinvy
2 Replies

2. Shell Programming and Scripting

Press Any Key script sequence using bash - HELP

hi to all. im a newbie in unix shell scripts. i want to make a simple unix shell script using the bash shell that asks a user to press any key after a series of commands, or an x if he wishes to exit. here's a sample script that i made: #!/usr/bin/bash pause(){ /usr/bin/echo "\t\t Press... (3 Replies)
Discussion started by: booghaw
3 Replies

3. Shell Programming and Scripting

Bash script [Press Tab] Screen Blank..

Dear Member, OLD Question --> disable-completion not solved My bash Menu script ping process problem. If ping still running and users press SCREEN is Blank... Cant Members help me.. kill signal or others scripting for my case, btw i use Linux.. Thanks, Rico My Bash Script : ... (1 Reply)
Discussion started by: carnegiex
1 Replies

4. Shell Programming and Scripting

Trap key press in a script

How can I trap a character press in the shell script. For eg:- I have a script runinng a infinite loops , I will need to quit if q is pressed. I have seen the traping the signal , but they give option only for traping the defined interrupt signals. But those does not help me here. (3 Replies)
Discussion started by: praveenbvarrier
3 Replies
Login or Register to Ask a Question