Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
User Commandssleep(1)


NAME

 sleep - suspend execution for an interval

SYNOPSIS

 sleep time

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

 Example 1. Example of the sleep command.
 

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 VARIABLES

 

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:

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

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWcsu

SEE ALSO

 

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

NOTES

 

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

  • Terminate normally with a zero exit status.
  • Effectively ignore the signal.

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


SunOS 5.9Go To TopLast Changed 1 Feb 1995

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.