12-14-2001
Re: Menu function stuck in a loop?
Quote:
Originally posted by darthur
exec < $QL_LOG2
while read line ; do
echo 'delete qlocal('${line}')' >>$QL_LOG3
done
cleanupmenu
With that exec statement you set the script's standard-in to a file. Then with that loop you read all the data. At this point, standard-in is at end-of-file. Then you call cleanupmenu which contains a read statement. That read statement will try to read one more line from the $QL_LOG2 file but it won't succeed. You need to add
exec < /dev/tty
before you invoke cleanupmenu to put standard-in back to being the tty.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Below is my menu options code. It allows user to pick one of two option. I can get the first option to work, because if it is selected it just "breaks" and carries on with the script.
What i want to know is if a user selects option two how do i get that option to ignore all the other script and... (6 Replies)
Discussion started by: amatuer_lee_3
6 Replies
2. Shell Programming and Scripting
Below is my menu options code. It allows user to pick one of two option. I can get the first option to work, because if it is selected it just "breaks" and carries on with the script.
What i want to know is if a user selects option two how do i get that option to ignore all the other script and... (3 Replies)
Discussion started by: amatuer_lee_3
3 Replies
3. Shell Programming and Scripting
Hi all! Im trying to get this script to check for folders in a year/month/day folder structure and if the day doesnt exist then it makes the day. It will also make sure all of the days before todays date exist as well. This script assumes that the month and year folder already exist. It works... (3 Replies)
Discussion started by: Grizzly
3 Replies
4. Shell Programming and Scripting
I am using a Perl script to open a series of files in a loop, separate the paragraph into lines, and output the lines into a new file. The code works perfectly fine, except when the source file is over a certain size the loop gets stuck and won’t move on to the next file. It still does what it is... (0 Replies)
Discussion started by: renthead720
0 Replies
5. Shell Programming and Scripting
I'm a noob working on a script to take 3 user inputs. One of them is simply a variable: "poolname". The other 2 are cases: "groupa/groupb" and "enable/disable". "groupa" and "groupb" reference 2 files - groupa.txt or groupb.txt. These files simply consist of a list of server IP addresses and port... (2 Replies)
Discussion started by: *nixnoob
2 Replies
6. Shell Programming and Scripting
Hi,
I have a script that copies a file from one directory to another and compiles it.
What I have now is a menu that calls functions and each function compiles the file.
I want to have a function that compiles the file at the end of the script if the user selects options 1-3 in the menu, but... (0 Replies)
Discussion started by: amitlib
0 Replies
7. Shell Programming and Scripting
In the bash menu below if the variant that is inputted is in the format NM_004004.3:c.274G>T the below works perfectly. My question is if the variant inputted isNM_004004.3:-c.274G>T or NM_004004.3:+c.274G>T then the code as is will throw an error due to a biological issue. Is it possible to to... (1 Reply)
Discussion started by: cmccabe
1 Replies
8. Shell Programming and Scripting
Hi All,
I have a menu driven scripts. As you know while running the script we have to input the option such as 1,2, and 3 to execute function accordingly. but after selecting the input we have to press Enter.
My requirement is to execute function as soon as we press the option.
Is there... (5 Replies)
Discussion started by: kiran_j
5 Replies
9. Shell Programming and Scripting
hi i am new to bash scripting ..
i created a bunch of folders but only want the folder names with file1. so i go in and make an array to grab the folders the put in a file then i strip the directories so i just have the folder names i need then i would like to make the menu with a selection... (3 Replies)
Discussion started by: lamby22
3 Replies
LEARN ABOUT CENTOS
tapset::tty
tapset::tty(3stap) tapset::tty(3stap)
NAME
tapset::tty - systemtap tty tapset
DESCRIPTION
tty.open
Called when a tty is opened
See probe::tty.open(3stap)
for details.
tty.release
Called when the tty is closed
See probe::tty.release(3stap)
for details.
tty.resize
Called when a terminal resize happens
See probe::tty.resize(3stap)
for details.
tty.ioctl
called when a ioctl is request to the tty
See probe::tty.ioctl(3stap)
for details.
tty.init
Called when a tty is being initalized
See probe::tty.init(3stap)
for details.
tty.register
Called when a tty device is registred
See probe::tty.register(3stap)
for details.
tty.unregister
Called when a tty device is being unregistered
See probe::tty.unregister(3stap)
for details.
tty.poll
Called when a tty device is being polled
See probe::tty.poll(3stap)
for details.
tty.receive
called when a tty receives a message
See probe::tty.receive(3stap)
for details.
tty.write
write to the tty line
See probe::tty.write(3stap)
for details.
tty.read
called when a tty line will be read
See probe::tty.read(3stap)
for details.
SEE ALSO
probe::tty.open(3stap), probe::tty.release(3stap), probe::tty.resize(3stap), probe::tty.ioctl(3stap), probe::tty.init(3stap),
probe::tty.register(3stap), probe::tty.unregister(3stap), probe::tty.poll(3stap), probe::tty.receive(3stap), probe::tty.write(3stap),
probe::tty.read(3stap), stap(1), stapprobes(3stap)
IBM
--- tapset::tty(3stap)