[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    sleep(1) manual page Table of Contents

Name

sleep - suspend execution for an interval

Synopsis

sleep time

Availability

SUNWcsu

Description

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

Operands

The following operands are supported:
time
A non-negative decimal integer specifying the number of seconds for which to suspend execution.

Examples

To execute a command after a certain amount of time:

   (sleep 105; command)&

or to execute a command every so often:

   while true

   do

       command

       sleep 37

   done

Environment

See environ(5) for descriptions of the following environment variables that affect the execution of sleep: LC_CTYPE , LC_MESSAGES , and NLSPATH .

Exit Status

The following exit values are returned:
  1. The execution was successfully suspended for at least time seconds, or a SIGALRM signal was received (see NOTES).
    >0
    An error has occurred.

    See Also

    wait(1) , alarm(2) , sleep(3C) , wait(3B) , environ(5)

    Notes

    If the sleep utility receives a SIGALRM signal, one of the following actions will be taken:

    The sleep utility will take the standard action for all other signals.


    Table of Contents