sleep—suspends execution for some number of seconds
sleep time
sleep suspends execution for time seconds. It is used to execute a command after a certain amount of time.
Example A.50.
1 (sleep 105; command)&
2 (In Script)
while true
do
command
sleep 60
done
EXPLANATION
After 105 seconds, command is executed. Prompt returns immediately. Enters loop; executes command and sleeps for a minute before entering the loop again.
|