Sponsored Content
Top Forums Shell Programming and Scripting Script does not stop when doing a read Post 302143872 by porter on Monday 5th of November 2007 02:38:37 AM
Old 11-05-2007
1. what does "while :" mean?

2. everything inside the while/read/do/done will use testdata as stdin, including the "read YESNO", you would need to do

Code:
TTY=`tty`

while read ...
do
...
         read YESNO <$TTY
...
done <testdata

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script that doesn't stop

Hi all, I got a script that runs automatically using the cron file. The script starts running at midnight and suppose to delete image files from folders and sub-folders. The script ends when he finishes deleting or after 5 hours. My problem is that the script doesn't stop running even after 5... (3 Replies)
Discussion started by: biot
3 Replies

2. Shell Programming and Scripting

Script to run non-stop

Hi All, I am on a Solaris OS and i have come up with a csh script named " mycshscript " which will grab data from a datalog file & format the grabbed data & upload formated version to web server. I would want to have this script to run non-stop so that the latest can be captured since data is... (37 Replies)
Discussion started by: Raynon
37 Replies

3. UNIX for Dummies Questions & Answers

Stop a shell script

Hi, I am writing a bash shell script. How can I tell it to stop. For example, I would like to have something similar to the following: mike=1 if ; then STOP THE SCRIPT fi (3 Replies)
Discussion started by: msb65
3 Replies

4. Shell Programming and Scripting

script don't stop

Hello everybody! I am new to this and I am trying to change a script in an open source program that plots some offset vectors and then calls a postscript viewer. I have commented away the call for the postscript viewer but somehow the script doesn't return to the shell prompt. I cant figure out... (3 Replies)
Discussion started by: larne
3 Replies

5. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

6. Shell Programming and Scripting

read a string from its end to its start and stop when you find a specific character

How can I do this? Actually I have a file which contains a path e.g. /home/john/Music/hello.mp3 and I want to take only the filename (hello.mp3) So, I need to read the file from its end to its start till the character "/" Is this possible? Thanks, I am sure you'll not disappoint me here! Oh,... (9 Replies)
Discussion started by: hakermania
9 Replies

7. Shell Programming and Scripting

Stop child script by stoping parent script

Hi everyone, I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that parent_script for a in 1 2 3 4 5 do exec test -n $a done What I want to do is when parent_script is killed,... (0 Replies)
Discussion started by: geovas
0 Replies

8. Shell Programming and Scripting

Loop to read parameters and stop

Hey guys, How do I make a loop that reads all the parameters en then stop when there are no parameters anymore ? Something that gives an output like this: ./Script.sh parameter1 parameter2 parameter3 parameter = parameter1 parameter = parameter2 parameter = parameter3 Thanks a lot,... (5 Replies)
Discussion started by: Miki1579
5 Replies

9. Shell Programming and Scripting

Read command stop on either EOF or a specific line

I'm trying to stop reading a file until the end of the file is reached or a defined delimiter line is reached. Some how I need to test the fail state of the last 2 commands, not just the last command. echo -e "hello\ngoodbye\n####\ntesting" | while read line; ]; do echo "$line"; done hello... (4 Replies)
Discussion started by: Michael Stora
4 Replies

10. Programming

Read in numbers from console won't stop at newline.

Hello, I have snippet code from Lippman's <<C++ primer>>. The program is to convert regular decimal (0 ~ 15) numbers to basic hexdecimals. The instruction tells the program will execute by hitting newline at the end. When I tried to run the compiled program, hitting ENTER did not work as... (3 Replies)
Discussion started by: yifangt
3 Replies
SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)                         systemd-tty-ask-password-agent                         SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)

NAME
systemd-tty-ask-password-agent - List or process pending systemd password requests SYNOPSIS
systemd-tty-ask-password-agent [OPTIONS...] [VARIABLE=VALUE...] DESCRIPTION
systemd-tty-ask-password-agent is a password agent that handles password requests of the system, for example for hard disk encryption passwords or SSL certificate passwords that need to be queried at boot-time or during runtime. systemd-tty-ask-password-agent implements the Password Agents Specification[1], and is one of many possible response agents which answer to queries formulated with systemd-ask-password(1). OPTIONS
The following options are understood: --list Lists all currently pending system password requests. --query Process all currently pending system password requests by querying the user on the calling TTY. --watch Continuously process password requests. --wall Forward password requests to wall(1) instead of querying the user on the calling TTY. --plymouth Ask question with plymouth(8) instead of querying the user on the calling TTY. --console Ask question on /dev/console instead of querying the user on the calling TTY. -h, --help Print a short help text and exit. --version Print a short version string and exit. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. SEE ALSO
systemd(1), systemctl(1), systemd-ask-password-console.service(8), wall(1), plymouth(8) NOTES
1. Password Agents Specification https://www.freedesktop.org/wiki/Software/systemd/PasswordAgents systemd 237 SYSTEMD-TTY-ASK-PASSWORD-AGENT(1)
All times are GMT -4. The time now is 11:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy