92 lines
2.8 KiB
Groff
92 lines
2.8 KiB
Groff
.\" $OpenBSD: sleep.1,v 1.24 2022/07/30 16:42:08 jsg Exp $
|
|
.\" $NetBSD: sleep.1,v 1.9 1995/07/25 19:37:43 jtc Exp $
|
|
.\"
|
|
.\" Copyright (c) 1990, 1993, 1994
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
.\" the Institute of Electrical and Electronics Engineers, Inc.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)sleep.1 8.3 (Berkeley) 4/18/94
|
|
.\"
|
|
.Dd $Mdocdate: July 30 2022 $
|
|
.Dt SLEEP 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm sleep
|
|
.Nd suspend execution for an interval of time
|
|
.Sh SYNOPSIS
|
|
.Nm sleep
|
|
.Ar seconds
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
utility suspends execution for at least the given number of
|
|
.Ar seconds .
|
|
.Ar seconds
|
|
must be a non-negative decimal value and may contain a fraction.
|
|
.Sh ASYNCHRONOUS EVENTS
|
|
.Bl -tag -width "SIGALRMXXX"
|
|
.It Dv SIGALRM
|
|
Terminate early, with a zero exit status.
|
|
.El
|
|
.Sh EXIT STATUS
|
|
.Ex -std sleep
|
|
.Sh EXAMPLES
|
|
Wait five seconds before running a command:
|
|
.Pp
|
|
.Dl $ sleep 5 ; echo Hello, World!
|
|
.Pp
|
|
List a file twice per second:
|
|
.Bd -literal -offset indent
|
|
while ls -l file; do
|
|
sleep 0.5
|
|
done
|
|
.Ed
|
|
.Sh SEE ALSO
|
|
.Xr at 1
|
|
.Sh STANDARDS
|
|
The
|
|
.Nm
|
|
utility is compliant with the
|
|
.St -p1003.1-2008
|
|
specification.
|
|
.Pp
|
|
Support for fractional
|
|
.Ar seconds
|
|
is an extension to that specification.
|
|
.Sh HISTORY
|
|
A
|
|
.Nm
|
|
utility first appeared in
|
|
.At v4 .
|
|
.Pp
|
|
This implementation of
|
|
.Nm
|
|
first appeared in
|
|
.Bx 4.3 Tahoe .
|