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.
Examples:
Sleep for 15 seconds:
sleep 15
Description:
The sleep utility suspends execution for at least the integral
number of seconds specified by the time operand.
Exit status:
- 0
- The execution was successfully suspended for at least
time seconds, or a SIGALRM signal
was received.
- >0
- An error occurred.
Asynchronous Events:
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.
See also:
- sh utility (Command interpreter)