[Previous] [Contents] [Next]

sleep

Suspend execution for an interval (POSIX)

Syntax:

sleep time

Options:

time
A non-negative decimal integer specifying the number of seconds to suspend execution. Note that very large values for time that would sleep past the year 2037 should be avoided. Note also that values greater than 65536 are not necessarily supported on all POSIX systems.

Description:

The sleep utility suspends execution for at least the integral number of seconds specified by the time operand.

Examples:

Sleep for 15 seconds:

    sleep 15

Signals:

The sleep utility takes the default action for all signals, except that sleep terminates normally with a zero exit status on receipt of a SIGALRM signal.

Exit status:

0
The execution was successfully suspended for at least time seconds, or a SIGALRM signal was received.
>0
An error occurred.

See also:

sh


[Previous] [Contents] [Next]