summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoruwe <uwe@NetBSD.org>2023-02-19 10:54:35 +0000
committeruwe <uwe@NetBSD.org>2023-02-19 10:54:35 +0000
commit20b7c53f4bd5bdabd5e79f7705a64ec98a302459 (patch)
tree2c8777e50dc673a70962354fd45cbb5671e7ad52 /bin
parentfcd46dfa696cc34f9b7bd86bfe9a96ecee5ff87d (diff)
sleep(1): minor markup tweaks
Diffstat (limited to 'bin')
-rw-r--r--bin/sleep/sleep.155
1 files changed, 36 insertions, 19 deletions
diff --git a/bin/sleep/sleep.1 b/bin/sleep/sleep.1
index 1ee73b33e4b..3d96f1d9456 100644
--- a/bin/sleep/sleep.1
+++ b/bin/sleep/sleep.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: sleep.1,v 1.27 2019/01/27 17:42:53 wiz Exp $
+.\" $NetBSD: sleep.1,v 1.28 2023/02/19 10:54:35 uwe Exp $
.\"
.\" Copyright (c) 1990, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -47,19 +47,24 @@ The
utility suspends execution for a minimum of
.Ar seconds
seconds, then exits.
-It is usually used to schedule the execution of other commands (see
+It is usually used to schedule the execution of other commands
+.Po
+see
.Sx EXAMPLES
-below).
+below
+.Pc .
.Pp
-Note: The
+.Em Note :
+The
.Nx
.Nm
command will accept and honor a non-integer number of specified seconds.
Note however, that if the request is for much more than 2.5 hours,
any fractional seconds will be ignored.
-Permitting non-integral delays is a non-portable extension,
-and its use will decrease the probability that
-a shell script will execute properly on another system.
+Permitting non-integral delays is a
+.Em non-portable
+extension, and its use will decrease the probability that a shell
+script will execute properly on another system.
.Pp
When the
.Dv SIGINFO
@@ -74,7 +79,7 @@ utility exits with one of the following values:
On successful completion, or if the signal
.Dv SIGALRM
was received.
-.It Li \&>\&0
+.It Li \&>0
An error occurred.
.El
.Sh EXAMPLES
@@ -84,10 +89,12 @@ To schedule the execution of a command for 1800 seconds later:
.Pp
This incantation would wait half an hour before
running the script
-.Dq command_file .
-(See the
+.Ar command_file .
+.Po
+See the
.Xr at 1
-utility.)
+utility
+.Pc .
.Pp
To repeatedly run a command (using
.Xr csh 1 ) :
@@ -110,17 +117,27 @@ The scenario for a script such as this might be: a program currently
running is taking longer than expected to process a series of
files, and it would be nice to have
another program start processing the files created by the first
-program as soon as it is finished (when zzz.rawdata is created).
-The script checks every five minutes for the file zzz.rawdata.
-When the file is found, processing the generated files (*.rawdata)
+program as soon as it is finished
+.Po
+when
+.Li zzz.rawdata
+is created
+.Pc .
+The script checks every five minutes for the file
+.Li zzz.rawdata .
+When the file is found, processing the generated files
+.Pq Li *.rawdata
is done courteously by sleeping for 70 seconds in between each
awk job.
.Pp
To wait until a particular time, the following,
-with some error checking added, might be used (using
+with some error checking added, might be used
+.Po
+using
.Xr sh 1
on
-.Nx ) :
+.Nx
+.Pc :
.Bd -literal -offset indent
END=$(( $( date -d "$1" +%s ) - START_TIME ))
while [ "${SECONDS}" -lt "${END}" ]
@@ -130,7 +147,7 @@ done
.Ed
.Pp
where the argument
-.Sq \&$1
+.Ql $1
specifies the desired date and time in any format the
.Fl d
option to the
@@ -155,11 +172,11 @@ A
utility appeared in
.At v4 .
Processing fractional seconds, and processing the
-.Ic seconds
+.Ar seconds
argument respecting the current locale, was added in
.Nx 1.3 .
The ability to sleep for extended periods appeared in
-.Nx 9 .
+.Nx 9.0 .
.Sh BUGS
This
.Nm