sleep-suspends execution for some number of seconds

 <  Day Day Up  >  

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

  1. After 105 seconds, command is executed. Prompt returns immediately.

  2. Enters loop; executes command and sleeps for a minute before entering the loop again.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net