Hi, not SuSE related, but ... :) how can I make a bash script to wait 10 seconds? I read about wait command, but it looks like the only argument it takes is the job ID. Cheers Sunny
On Mon, 2005-05-16 at 09:14, Sunny wrote:
Hi, not SuSE related, but ... :)
how can I make a bash script to wait 10 seconds? I read about wait command, but it looks like the only argument it takes is the job ID.
Cheers Sunny
man sleep Brad Dameron SeaTab Software www.seatab.com
Sunny, On Monday 16 May 2005 09:14, Sunny wrote:
Hi, not SuSE related, but ... :)
how can I make a bash script to wait 10 seconds? I read about wait command, but it looks like the only argument it takes is the job ID.
Brad already told you how to solve your immediate problem, but I wanted to add that "wait" is for synchronizing the shell (whether it's executing a script or operating interactively) with background jobs. By default, the wait command waits for all background jobs to complete. Also, the argument may be a job number or a process ID, but that process must be one spawned directly by the shell (as reported when the '&' operator is used to detach a job). Note, too, that by necessity "wait" is a shell built-in, so you can get terse help with "help wait" and full documentation via man.
Cheers Sunny
Randall Schulz
On 5/16/05, Randall R Schulz <rschulz@sonic.net> wrote:
Sunny,
On Monday 16 May 2005 09:14, Sunny wrote:
Hi, not SuSE related, but ... :)
how can I make a bash script to wait 10 seconds? I read about wait command, but it looks like the only argument it takes is the job ID.
Brad already told you how to solve your immediate problem, but I wanted to add that "wait" is for synchronizing the shell (whether it's executing a script or operating interactively) with background jobs. By default, the wait command waits for all background jobs to complete. Also, the argument may be a job number or a process ID, but that process must be one spawned directly by the shell (as reported when the '&' operator is used to detach a job). Note, too, that by necessity "wait" is a shell built-in, so you can get terse help with "help wait" and full documentation via man.
Cheers Sunny
Randall Schulz
Yes, Brad hit the point. But thanks for the clarification. I was a little bit confused reading about wait in Advanced Bash scripting. It was not very clear about that all these processes should be spawned by the shell, and I was almost put in a wrong direction. I needed to wait until one daemon dies, and it looks like wait was not the solution :) Cheers Sunny
participants (3)
-
Brad Dameron
-
Randall R Schulz
-
Sunny