sleep(1) User Commands sleep(1)
sleep - suspend execution for an interval
The sleep utility will suspend execution for at least the integral num-
ber of seconds specified by the time operand.
The following operands are supported:
time A non-negative decimal integer specifying the number of sec-
onds for which to suspend execution.
Example 1: Suspending command execution for a time
To execute a command after a certain amount of time:
example% (sleep 105; command)&
Example 2: Executing a command every so often
example% while true
See environ(5) for descriptions of the following environment variables
that affect the execution of sleep: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
The following exit values are returned:
0 The execution was successfully suspended for at least time
seconds, or a SIGALRM signal was received (see NOTES).
>>0 An error has occurred.
See attributes(5) for descriptions of the following attributes:
tab() allbox; cw(2.750000i)| cw(2.750000i) lw(2.750000i)|
lw(2.750000i). ATTRIBUTE TYPEATTRIBUTE VALUE AvailabilitySUNWcsu
wait(1), alarm(2), sleep(3C), wait(3UCB), attributes(5), environ(5),
If the sleep utility receives a SIGALRM signal, one of the following
actions will be taken:
o Terminate normally with a zero exit status.
o Effectively ignore the signal.
The sleep utility will take the standard action for all other signals.
SunOS 5.10 1 Feb 1995 sleep(1)