Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Rob on May 27, 2002, 08:46:28 AM

Title: a bash command to pause?
Post by: Rob on May 27, 2002, 08:46:28 AM
Hi

Anyone know a command that i can use to make a script pause? I want the script to wait till the cdrom is mounted.

TIA
Rob
Title: Re: a bash command to pause?
Post by: Rob Wellesley on May 27, 2002, 08:47:26 AM
doh - forgot to check the

"Email replies to this thread, to the address above."

checkbox
Title: Re: a bash command to pause?
Post by: Des Dougan on May 27, 2002, 09:48:48 AM
Rob,

"sleep" should do what you want:

sleep
This is the shell equivalent of a wait loop. It pauses for a specified number of seconds, doing nothing. This can be useful for timing or in processes running in the background, checking for a specific event every so often).    
1 sleep 3
2 # Pauses 3 seconds.

From the "Advanced BASH scripting guide"


Des Dougan