sleep(1) sleep(1)
NAME
sleep - suspend process execution for an interval
SYNOPSIS
sleep time
DESCRIPTION
The sleep command suspends the execution of the process that calls it
for a user-defined period of time.
sleep is used mainly in shell scripts to delay the execution of the
next command.
ARGUMENTS
time The time in seconds after which execution of the process is to
resume. At least time seconds must elapse.
time must be a non-negative decimal number.
ERROR MESSAGE
sleep: bad character in argument
You have used a negative integer or a non-numeric expression for time.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
Page 1 Reliant UNIX 5.44 Printed 11/98
sleep(1) sleep(1)
EXAMPLES
Example 1
This example makes use of sleep from the command line. You start a
background process to remind yourself in 10 minutes (600 seconds) that
you need to make a phone call.
$ (sleep 600; echo 'Call Mr. Jones!')&
Example 2
In this example, sleep is used within a shell script named always,
which calls the backup program every two minutes:
$ cat always
while true
do
backup
sleep 120
done
If you run the always script as a background process, you will only be
able to terminate it with kill, not with the <DEL> key.
SEE ALSO
wait(1), alarm(2), sleep(3C).
Page 2 Reliant UNIX 5.44 Printed 11/98