From 19fe1c42bd0adf943c2cc146b0978180ebd026de Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 31 Jan 2009 10:17:02 +0100 Subject: [PATCH] manpages: Split DIAGNOSTICS into EXIT STATUS and DIAGNOSTICS. DIAGNOSTICS shall have information about diagnostic messages while exit code information (.Ex macro) goes to EXIT STATUS. Inspired-by: FreeBSD --- bin/chmod/chmod.1 | 4 ++-- bin/cp/cp.1 | 2 +- bin/dd/dd.1 | 2 +- bin/echo/echo.1 | 2 +- bin/kill/kill.1 | 4 ++-- bin/mkdir/mkdir.1 | 2 +- bin/mv/mv.1 | 2 +- bin/pwd/pwd.1 | 2 +- bin/pwd/realpath.1 | 2 +- bin/sleep/sleep.1 | 4 ++-- bin/stty/stty.1 | 2 +- sbin/hammer/hammer.8 | 4 ++-- sbin/kldload/kldload.8 | 2 +- sbin/nfsiod/nfsiod.8 | 2 +- sbin/route/route.8 | 4 ++-- share/examples/mdoc/example.1 | 7 ++++--- share/misc/mdoc.template | 7 +++++-- usr.bin/asa/asa.1 | 4 ++-- usr.bin/column/column.1 | 4 ++-- usr.bin/comm/comm.1 | 2 +- usr.bin/compress/compress.1 | 2 +- usr.bin/csplit/csplit.1 | 4 ++-- usr.bin/expand/expand.1 | 2 +- usr.bin/getconf/getconf.1 | 3 ++- usr.bin/head/head.1 | 2 +- usr.bin/hexdump/hexdump.1 | 4 ++-- usr.bin/hexdump/od.1 | 2 +- usr.bin/iconv/iconv.1 | 2 +- usr.bin/id/groups.1 | 2 +- usr.bin/id/id.1 | 2 +- usr.bin/id/whoami.1 | 2 +- usr.bin/join/join.1 | 2 +- usr.bin/jot/jot.1 | 3 ++- usr.bin/locale/locale.1 | 2 +- usr.bin/logger/logger.1 | 4 ++-- usr.bin/logname/logname.1 | 2 +- usr.bin/mkfifo/mkfifo.1 | 2 +- usr.bin/nl/nl.1 | 2 +- usr.bin/paste/paste.1 | 4 ++-- usr.bin/pathchk/pathchk.1 | 4 ++-- usr.bin/printenv/printenv.1 | 2 +- usr.bin/printf/printf.1 | 2 +- usr.bin/stat/stat.1 | 4 ++-- usr.bin/tabs/tabs.1 | 2 +- usr.bin/tail/tail.1 | 2 +- usr.bin/tee/tee.1 | 2 +- usr.bin/touch/touch.1 | 2 +- usr.bin/tr/tr.1 | 4 ++-- usr.bin/truncate/truncate.1 | 3 ++- usr.bin/uname/uname.1 | 2 +- usr.bin/uniq/uniq.1 | 2 +- usr.bin/wc/wc.1 | 4 ++-- usr.bin/who/who.1 | 2 +- usr.bin/xinstall/install.1 | 2 +- usr.sbin/ac/ac.8 | 2 +- usr.sbin/btxld/btxld.8 | 2 +- usr.sbin/chown/chgrp.1 | 2 +- usr.sbin/chown/chown.8 | 2 +- usr.sbin/kgzip/kgzip.8 | 2 +- usr.sbin/makewhatis/makewhatis.8 | 2 +- usr.sbin/mtree/mtree.8 | 4 ++-- usr.sbin/ngctl/ngctl.8 | 2 +- usr.sbin/rtadvd/rtadvd.8 | 2 +- usr.sbin/rtsold/rtsold.8 | 2 +- usr.sbin/sa/sa.8 | 2 +- 65 files changed, 91 insertions(+), 84 deletions(-) diff --git a/bin/chmod/chmod.1 b/bin/chmod/chmod.1 index a27947dce4..594d6bbc57 100644 --- a/bin/chmod/chmod.1 +++ b/bin/chmod/chmod.1 @@ -104,6 +104,8 @@ command's actions are determined by the last one specified. .Pp Only the owner of a file or the super-user is permitted to change the mode of a file. +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES .Bl -tag -width "u=rwx,go=u-w" -compact .It Li 644 @@ -131,8 +133,6 @@ clear all mode bits for group and others. .It Li g=u-w set the group bits equal to the user bits, but clear the group write bit. .El -.Sh DIAGNOSTICS -.Ex -std .Sh MODES Modes may be absolute or symbolic. An absolute mode is an octal number constructed from the sum of diff --git a/bin/cp/cp.1 b/bin/cp/cp.1 index c43b8eb2e0..c59ca3e50d 100644 --- a/bin/cp/cp.1 +++ b/bin/cp/cp.1 @@ -245,7 +245,7 @@ argument for .Xr stty 1 ) signal, the current input and output file and the percentage complete will be written to standard error. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY Historic versions of the diff --git a/bin/dd/dd.1 b/bin/dd/dd.1 index 3596e85880..630fa35640 100644 --- a/bin/dd/dd.1 +++ b/bin/dd/dd.1 @@ -356,7 +356,7 @@ be written to the standard error output in the same format as the standard completion message and .Nm will exit. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr cp 1 , diff --git a/bin/echo/echo.1 b/bin/echo/echo.1 index 25f9b68485..15a136fa17 100644 --- a/bin/echo/echo.1 +++ b/bin/echo/echo.1 @@ -81,7 +81,7 @@ command which is similar or identical to this utility. Consult the .Xr builtin 1 manual page. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr builtin 1 , diff --git a/bin/kill/kill.1 b/bin/kill/kill.1 index f802caf157..9b01fac669 100644 --- a/bin/kill/kill.1 +++ b/bin/kill/kill.1 @@ -118,6 +118,8 @@ command which is similar or identical to this utility. Consult the .Xr builtin 1 manual page. +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Terminate the processes with pids 142 and 157: @@ -133,8 +135,6 @@ to the process with pid 507: Terminate the process group with pgid 117: .Pp .Dl "kill -- -117" -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr builtin 1 , .Xr csh 1 , diff --git a/bin/mkdir/mkdir.1 b/bin/mkdir/mkdir.1 index 3fb3cc03ca..358617c7e7 100644 --- a/bin/mkdir/mkdir.1 +++ b/bin/mkdir/mkdir.1 @@ -87,7 +87,7 @@ Be verbose when creating directories, listing them as they are created. .El .Pp The user must have write permission in the parent directory. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The diff --git a/bin/mv/mv.1 b/bin/mv/mv.1 index 3e1f138877..19a8b8ada2 100644 --- a/bin/mv/mv.1 +++ b/bin/mv/mv.1 @@ -153,7 +153,7 @@ argument for .Xr stty 1 ) signal, the current input and output file will be written to standard error. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The diff --git a/bin/pwd/pwd.1 b/bin/pwd/pwd.1 index 5c6d1b22bf..07ba473acd 100644 --- a/bin/pwd/pwd.1 +++ b/bin/pwd/pwd.1 @@ -76,7 +76,7 @@ Environment variables used by .It Ev PWD Logical current working directory. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr builtin 1 , diff --git a/bin/pwd/realpath.1 b/bin/pwd/realpath.1 index d1d18256bb..7f7025d6e8 100644 --- a/bin/pwd/realpath.1 +++ b/bin/pwd/realpath.1 @@ -58,7 +58,7 @@ and .Pa /../ in .Ar path . -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr realpath 3 diff --git a/bin/sleep/sleep.1 b/bin/sleep/sleep.1 index 6809adddff..6f48ea6c44 100644 --- a/bin/sleep/sleep.1 +++ b/bin/sleep/sleep.1 @@ -70,6 +70,8 @@ character as a decimal point). This is a non-portable extension, and its use will nearly guarantee that a shell script will not execute properly on another system. .Ef +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES To schedule the execution of a command for .Va x @@ -110,8 +112,6 @@ The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done courteously by sleeping for 70 seconds in between each awk job. -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr nanosleep 2 , .Xr sleep 3 diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 35da6b676f..7615573155 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -574,7 +574,7 @@ Same as the control character Same as the control character .Cm reprint . .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr termios 4 diff --git a/sbin/hammer/hammer.8 b/sbin/hammer/hammer.8 index 1f9b732495..aa0ebb5d36 100644 --- a/sbin/hammer/hammer.8 +++ b/sbin/hammer/hammer.8 @@ -759,8 +759,6 @@ The directive requires that the target be configured as a slave and that the .Ar shared-uuid field of the mirroring source and target match. -.Sh DIAGNOSTICS -.Ex -std .Sh FILES .Bl -tag -width ".It Pa /var/slaves/" -compact .It Pa snapshots @@ -772,6 +770,8 @@ configuration file .It Pa /var/slaves/ recommended slave PFS snapshots directory .El +.Sh EXIT STATUS +.Ex -std .Sh SEE ALSO .Xr undo 1 , .Xr HAMMER 5 , diff --git a/sbin/kldload/kldload.8 b/sbin/kldload/kldload.8 index 84890dacc4..7b184a722c 100644 --- a/sbin/kldload/kldload.8 +++ b/sbin/kldload/kldload.8 @@ -57,7 +57,7 @@ directory containing loadable modules. Modules must have an extension of .Pa .ko . .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh AUTOMATICALLY LOADING MODULES Some modules (ipfw, ipf, etc.) may be automatically loaded at boot diff --git a/sbin/nfsiod/nfsiod.8 b/sbin/nfsiod/nfsiod.8 index 20d829ce1f..fbc130c85f 100644 --- a/sbin/nfsiod/nfsiod.8 +++ b/sbin/nfsiod/nfsiod.8 @@ -78,7 +78,7 @@ KLD was available, The .Nm utility exits with an error. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr nfsstat 1 , diff --git a/sbin/route/route.8 b/sbin/route/route.8 index f0c5bcb4d6..44b6de06a6 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -425,6 +425,8 @@ and .Dv RTM_CHANGE . As such, only the super-user may modify the routing tables. +.Sh EXIT STATUS +.Ex -std .Sh DIAGNOSTICS .Bl -diag .It "add [host \&| network ] %s: gateway %s flags %x" @@ -462,8 +464,6 @@ operation resulted in a route whose gateway uses the same route as the one being changed. The next-hop gateway should be reachable through a different route. .El -.Pp -.Ex -std .Sh SEE ALSO .\".Xr esis 4 , .Xr netintro 4 , diff --git a/share/examples/mdoc/example.1 b/share/examples/mdoc/example.1 index 72ed8e831c..fc1cf47202 100644 --- a/share/examples/mdoc/example.1 +++ b/share/examples/mdoc/example.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/examples/mdoc/example.1,v 1.12.2.6 2001/08/17 13:08:35 ru Exp $ +.\" $FreeBSD: src/share/examples/mdoc/example.1,v 1.23 2005/01/16 22:22:28 ru Exp $ .\" $DragonFly: src/share/examples/mdoc/example.1,v 1.2 2003/06/17 04:36:57 dillon Exp $ .\" .\" Note: The date here should be updated whenever a non-trivial @@ -81,6 +81,8 @@ Example of a file in the .Sx FILES section. .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The following is an example of a typical usage of the @@ -89,8 +91,7 @@ command: .Pp .Dl "example -abc -d xyzzy /dev/null" .Sh DIAGNOSTICS -Exit status is 0 on success, and 1 if the command -fails for one of the following reasons: +The command may fail for one of the following reasons: .Bl -diag .It "example error message" An example of an error message. diff --git a/share/misc/mdoc.template b/share/misc/mdoc.template index 339ba0ce26..04673e0919 100644 --- a/share/misc/mdoc.template +++ b/share/misc/mdoc.template @@ -1,4 +1,4 @@ -.\" $FreeBSD: src/share/misc/mdoc.template,v 1.3.2.1 2001/04/26 17:13:13 ru Exp $ +.\" $FreeBSD: src/share/misc/mdoc.template,v 1.5 2005/01/16 22:26:05 ru Exp $ .\" $DragonFly: src/share/misc/mdoc.template,v 1.2 2003/06/17 04:37:01 dillon Exp $ .\" .\" The following requests are required for all man pages. @@ -19,9 +19,12 @@ .\" This next request is for sections 1, 6, 7 and 8 only. .\" .Sh ENVIRONMENT .\" .Sh FILES +.\" This next request is for sections 1, 6, 7 and 8 only +.\" (command return values (to shell)). +.\" .Sh EXIT STATUS .\" .Sh EXAMPLES .\" This next request is for sections 1, 6, 7, 8 and 9 only -.\" (command return values (to shell) and fprintf/stderr type diagnostics). +.\" (fprintf/stderr type diagnostics). .\" .Sh DIAGNOSTICS .\" .Sh COMPATIBILITY .\" This next request is for sections 2, 3 and 9 error and signal handling only. diff --git a/usr.bin/asa/asa.1 b/usr.bin/asa/asa.1 index 285c779626..6a390258bd 100644 --- a/usr.bin/asa/asa.1 +++ b/usr.bin/asa/asa.1 @@ -73,6 +73,8 @@ before printing the rest of the line. Lines beginning with characters other than the above are treated as if they begin with .Aq space . +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES To view a file containing the output of a .Tn FORTRAN @@ -85,8 +87,6 @@ To format the output of a program and redirect it to a line-printer: .Pp .Dl "a.out | asa | lpr" -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr f77 1 .Sh STANDARDS diff --git a/usr.bin/column/column.1 b/usr.bin/column/column.1 index 705d654ec8..f385a2fae3 100644 --- a/usr.bin/column/column.1 +++ b/usr.bin/column/column.1 @@ -83,12 +83,12 @@ The environment variable is used to determine the size of the screen if no other information is available. .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES .Dl (printf \&"PERM LINKS OWNER GROUP SIZE MONTH DAY \&"\ \&;\ \&\e .Dl printf \&"HH:MM/YEAR NAME\en\&"\ \&;\ \&\e .Dl ls -l \&| sed 1d) \&| column -t -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr colrm 1 , .Xr ls 1 , diff --git a/usr.bin/comm/comm.1 b/usr.bin/comm/comm.1 index 94a17d2245..209c2103a2 100644 --- a/usr.bin/comm/comm.1 +++ b/usr.bin/comm/comm.1 @@ -85,7 +85,7 @@ The .Nm utility assumes that the files are lexically sorted; all characters participate in line comparisons. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr cmp 1 , diff --git a/usr.bin/compress/compress.1 b/usr.bin/compress/compress.1 index 4794054fad..6d596795d8 100644 --- a/usr.bin/compress/compress.1 +++ b/usr.bin/compress/compress.1 @@ -152,7 +152,7 @@ Compression is generally much better than that achieved by Huffman coding (as used in the historical command pack), or adaptive Huffman coding (as used in the historical command compact), and takes less time to compute. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std compress uncompress .Pp The diff --git a/usr.bin/csplit/csplit.1 b/usr.bin/csplit/csplit.1 index a9af66cd85..992499b0d9 100644 --- a/usr.bin/csplit/csplit.1 +++ b/usr.bin/csplit/csplit.1 @@ -125,6 +125,8 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Split the .Xr mdoc 7 @@ -137,8 +139,6 @@ into one file for each section (up to 20): Split standard input after the first 99 lines and every 100 lines thereafter: .Pp .Dl "csplit -k - 100 '{19}'" -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr sed 1 , .Xr split 1 , diff --git a/usr.bin/expand/expand.1 b/usr.bin/expand/expand.1 index c3b4c78535..36a247d57c 100644 --- a/usr.bin/expand/expand.1 +++ b/usr.bin/expand/expand.1 @@ -103,7 +103,7 @@ and .Nm unexpand as described in .Xr environ 7 . -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std expand unexpand .Sh STANDARDS The diff --git a/usr.bin/getconf/getconf.1 b/usr.bin/getconf/getconf.1 index d500807b2a..085a8c4a53 100644 --- a/usr.bin/getconf/getconf.1 +++ b/usr.bin/getconf/getconf.1 @@ -146,6 +146,8 @@ Several of the .Xr confstr 3 variables provide information on the necessary compiler and linker flags to use the standard programming environments described above. +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The command: .Pp @@ -174,7 +176,6 @@ in the programming environment, if the system supports that environment. .Sh DIAGNOSTICS -.Ex -std Use of a .Ar system_var or diff --git a/usr.bin/head/head.1 b/usr.bin/head/head.1 index 46b1600611..3cb272a737 100644 --- a/usr.bin/head/head.1 +++ b/usr.bin/head/head.1 @@ -60,7 +60,7 @@ header consisting of the string where .Dq XXX is the name of the file. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr tail 1 diff --git a/usr.bin/hexdump/hexdump.1 b/usr.bin/hexdump/hexdump.1 index 90b3e3b01e..b2a97231e0 100644 --- a/usr.bin/hexdump/hexdump.1 +++ b/usr.bin/hexdump/hexdump.1 @@ -333,6 +333,8 @@ If no format strings are specified, the default display is equivalent to specifying the .Fl x option. +.Sh EXIT STATUS +.Ex -std hexdump hd .Sh EXAMPLES Display the input in perusal format: .Bd -literal -offset indent @@ -346,7 +348,5 @@ Implement the \-x option: "%07.7_Ax\en" "%07.7_ax " 8/2 "%04x " "\en" .Ed -.Sh DIAGNOSTICS -.Ex -std hexdump hd .Sh SEE ALSO .Xr gdb 1 diff --git a/usr.bin/hexdump/od.1 b/usr.bin/hexdump/od.1 index 8b2e6ac9ca..6364d3a59e 100644 --- a/usr.bin/hexdump/od.1 +++ b/usr.bin/hexdump/od.1 @@ -232,7 +232,7 @@ contain one line for each format. If no output format is specified, .Fl t Ar oS is assumed. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The traditional diff --git a/usr.bin/iconv/iconv.1 b/usr.bin/iconv/iconv.1 index 03ad707e75..ef59462af9 100644 --- a/usr.bin/iconv/iconv.1 +++ b/usr.bin/iconv/iconv.1 @@ -94,7 +94,7 @@ Specifies the destination codeset name as .Ar to_name . .El .\" ---------------------------------------------------------------------- -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std iconv .\" ---------------------------------------------------------------------- .Sh SEE ALSO diff --git a/usr.bin/id/groups.1 b/usr.bin/id/groups.1 index 7b9ae2b743..6c020a784f 100644 --- a/usr.bin/id/groups.1 +++ b/usr.bin/id/groups.1 @@ -57,7 +57,7 @@ The .Nm utility displays the groups to which you (or the optionally specified user) belong. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr id 1 diff --git a/usr.bin/id/id.1 b/usr.bin/id/id.1 index 23229d2afe..a04e6d2615 100644 --- a/usr.bin/id/id.1 +++ b/usr.bin/id/id.1 @@ -122,7 +122,7 @@ options instead of the effective ID. .It Fl u Display the effective user ID as a number. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr who 1 diff --git a/usr.bin/id/whoami.1 b/usr.bin/id/whoami.1 index df261f710c..fb69d4bbde 100644 --- a/usr.bin/id/whoami.1 +++ b/usr.bin/id/whoami.1 @@ -55,7 +55,7 @@ is suggested for normal interactive use. The .Nm utility displays your effective user ID as a name. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr id 1 diff --git a/usr.bin/join/join.1 b/usr.bin/join/join.1 index 0577906730..dbaee5d320 100644 --- a/usr.bin/join/join.1 +++ b/usr.bin/join/join.1 @@ -168,7 +168,7 @@ or is .Dq - , the standard input is used. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY For compatibility with historic versions of diff --git a/usr.bin/jot/jot.1 b/usr.bin/jot/jot.1 index bffaeca863..c68a435e83 100644 --- a/usr.bin/jot/jot.1 +++ b/usr.bin/jot/jot.1 @@ -146,6 +146,8 @@ The name derives in part from .Nm iota , a function in APL. +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The command .Dl jot 21 -1 1.00 @@ -188,7 +190,6 @@ from column 10 and ending in column 132, use and to print all lines 80 characters or longer, .Dl grep `jot -s \&"\&" -b \&. 80` .Sh DIAGNOSTICS -.Ex -std The following diagnostic messages deserve special explanation: .Bl -diag .It "illegal or unsupported format '%s'" diff --git a/usr.bin/locale/locale.1 b/usr.bin/locale/locale.1 index f46aa42186..8f4ba1bd52 100644 --- a/usr.bin/locale/locale.1 +++ b/usr.bin/locale/locale.1 @@ -76,7 +76,7 @@ can be used to retrieve a human readable list of available keywords. .It Fl m Write names of all available charmaps. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std locale .Sh STANDARDS .Nm diff --git a/usr.bin/logger/logger.1 b/usr.bin/logger/logger.1 index c3049bdba9..b57057c44b 100644 --- a/usr.bin/logger/logger.1 +++ b/usr.bin/logger/logger.1 @@ -102,14 +102,14 @@ Write the message to log; if not specified, and the flag is not provided, standard input is logged. .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES .Bd -literal -offset indent -compact logger System rebooted logger \-p local0.notice \-t HOSTIDM \-f /dev/idmc .Ed -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr syslog 3 , .Xr syslogd 8 diff --git a/usr.bin/logname/logname.1 b/usr.bin/logname/logname.1 index 254f0b9404..d605b110a1 100644 --- a/usr.bin/logname/logname.1 +++ b/usr.bin/logname/logname.1 @@ -58,7 +58,7 @@ and .Ev USER environment variables because the environment cannot be trusted. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr who 1 , diff --git a/usr.bin/mkfifo/mkfifo.1 b/usr.bin/mkfifo/mkfifo.1 index 9ab1a021be..022492676a 100644 --- a/usr.bin/mkfifo/mkfifo.1 +++ b/usr.bin/mkfifo/mkfifo.1 @@ -80,7 +80,7 @@ of the calling process. The .Nm utility requires write permission in the parent directory. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr mkdir 1 , diff --git a/usr.bin/nl/nl.1 b/usr.bin/nl/nl.1 index 910bb63794..fc8e4713a8 100644 --- a/usr.bin/nl/nl.1 +++ b/usr.bin/nl/nl.1 @@ -220,7 +220,7 @@ The default .Ar width is 6. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr jot 1 , diff --git a/usr.bin/paste/paste.1 b/usr.bin/paste/paste.1 index 195bb2fe17..4a1663f240 100644 --- a/usr.bin/paste/paste.1 +++ b/usr.bin/paste/paste.1 @@ -111,6 +111,8 @@ is specified for one or more of the input files, the standard input is used; standard input is read one line at a time, circularly, for each instance of .Sq Fl . +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES List the files in the current directory in three columns: .Pp @@ -133,8 +135,6 @@ for use in the environment variable: .Pp .Dl "find / -name bin -type d | paste -s -d : -" -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr cut 1 , .Xr lam 1 diff --git a/usr.bin/pathchk/pathchk.1 b/usr.bin/pathchk/pathchk.1 index fdd56087a1..6767af81c9 100644 --- a/usr.bin/pathchk/pathchk.1 +++ b/usr.bin/pathchk/pathchk.1 @@ -97,6 +97,8 @@ No component may start with the hyphen character. .El .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Check whether the names of files in the current directory are portable to other @@ -104,8 +106,6 @@ other systems: .Pp .Dl "find . -print | xargs pathchk -p" -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr getconf 1 , .Xr pathconf 2 , diff --git a/usr.bin/printenv/printenv.1 b/usr.bin/printenv/printenv.1 index 83706700d6..3ec69980ac 100644 --- a/usr.bin/printenv/printenv.1 +++ b/usr.bin/printenv/printenv.1 @@ -121,7 +121,7 @@ this way also allows one to reference .Pa foo without the path, as well as set up the environment as desired. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std printenv .Pp .Ex -std env diff --git a/usr.bin/printf/printf.1 b/usr.bin/printf/printf.1 index bdd08f1a6a..cfe3cb70a7 100644 --- a/usr.bin/printf/printf.1 +++ b/usr.bin/printf/printf.1 @@ -269,7 +269,7 @@ command which is similar or identical to this utility. Consult the .Xr builtin 1 manual page. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The traditional diff --git a/usr.bin/stat/stat.1 b/usr.bin/stat/stat.1 index 330e36c8b7..13189a300a 100644 --- a/usr.bin/stat/stat.1 +++ b/usr.bin/stat/stat.1 @@ -420,6 +420,8 @@ and .Cm N which default to .Cm S . +.Sh EXIT STATUS +.Ex -std stat readlink .Sh EXAMPLES Given a symbolic link .Pa foo @@ -495,8 +497,6 @@ Apr 25 11:47:00 2002 /tmp/blah Apr 25 10:36:34 2002 /tmp/bar Apr 24 16:47:35 2002 /tmp/foo .Ed -.Sh DIAGNOSTICS -.Ex -std stat readlink .Sh SEE ALSO .Xr file 1 , .Xr ls 1 , diff --git a/usr.bin/tabs/tabs.1 b/usr.bin/tabs/tabs.1 index 0a859acf66..1749a8727c 100644 --- a/usr.bin/tabs/tabs.1 +++ b/usr.bin/tabs/tabs.1 @@ -134,7 +134,7 @@ nor the option are present, .Nm will fail. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr expand 1 , diff --git a/usr.bin/tail/tail.1 b/usr.bin/tail/tail.1 index f97203c1c9..39e36a0eb8 100644 --- a/usr.bin/tail/tail.1 +++ b/usr.bin/tail/tail.1 @@ -141,7 +141,7 @@ header consisting of the string where .Dq XXX is the name of the file. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr cat 1 , diff --git a/usr.bin/tee/tee.1 b/usr.bin/tee/tee.1 index 39f4c18e5d..48291c27c1 100644 --- a/usr.bin/tee/tee.1 +++ b/usr.bin/tee/tee.1 @@ -77,7 +77,7 @@ utility takes the default action for all signals, except in the event of the .Fl i option. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh STANDARDS The diff --git a/usr.bin/touch/touch.1 b/usr.bin/touch/touch.1 index c9b5e024da..c52b3244e7 100644 --- a/usr.bin/touch/touch.1 +++ b/usr.bin/touch/touch.1 @@ -124,7 +124,7 @@ If the .Dq SS letter pair is not specified, the value defaults to 0. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The obsolescent form of diff --git a/usr.bin/tr/tr.1 b/usr.bin/tr/tr.1 index ee95e6a023..4ac17acbba 100644 --- a/usr.bin/tr/tr.1 +++ b/usr.bin/tr/tr.1 @@ -232,6 +232,8 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES The following examples are shown as given to the shell: .Pp @@ -252,8 +254,6 @@ Remove diacritical marks from all accented variants of the letter .Sq e : .Pp .Dl "tr \*q[=e=]\*q \*qe\*q" -.Sh DIAGNOSTICS -.Ex -std .Sh COMPATIBILITY System V has historically implemented character ranges using the syntax ``[c-c]'' instead of the ``c-c'' used by historic diff --git a/usr.bin/truncate/truncate.1 b/usr.bin/truncate/truncate.1 index 661f953942..b3ecc04203 100644 --- a/usr.bin/truncate/truncate.1 +++ b/usr.bin/truncate/truncate.1 @@ -126,8 +126,9 @@ using (for example) the shell's .Ql >> redirection syntax, or .Xr dd 1 . -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std +.Sh DIAGNOSTICS If the operation fails for an argument, .Nm will issue a diagnostic diff --git a/usr.bin/uname/uname.1 b/usr.bin/uname/uname.1 index 5e1b59c1fe..110c77a2d6 100644 --- a/usr.bin/uname/uname.1 +++ b/usr.bin/uname/uname.1 @@ -89,7 +89,7 @@ utility (except for .Fl a ) will allow the corresponding data to be set to the contents of the environment variable. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr sysctl 3 , diff --git a/usr.bin/uniq/uniq.1 b/usr.bin/uniq/uniq.1 index 4de260af08..99ff23ed66 100644 --- a/usr.bin/uniq/uniq.1 +++ b/usr.bin/uniq/uniq.1 @@ -126,7 +126,7 @@ Case insensitive comparison of lines. If additional arguments are specified on the command line, the first argument is used as the name of an input file, the second is used as the name of an output file. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY The historic diff --git a/usr.bin/wc/wc.1 b/usr.bin/wc/wc.1 index 59c50d2709..73e8cbbf71 100644 --- a/usr.bin/wc/wc.1 +++ b/usr.bin/wc/wc.1 @@ -105,6 +105,8 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES Count the number of characters, words and lines in each of the files .Pa report1 @@ -113,8 +115,6 @@ and as well as the totals for both: .Pp .Dl "wc -mlw report1 report2" -.Sh DIAGNOSTICS -.Ex -std .Sh COMPATIBILITY Historically, the .Nm diff --git a/usr.bin/who/who.1 b/usr.bin/who/who.1 index f1d563f37a..5d27479ab3 100644 --- a/usr.bin/who/who.1 +++ b/usr.bin/who/who.1 @@ -136,7 +136,7 @@ as described in .It Pa /var/log/wtmp .It Pa /var/log/wtmp.[0-6] .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr last 1 , diff --git a/usr.bin/xinstall/install.1 b/usr.bin/xinstall/install.1 index b4aed08b74..c879c79351 100644 --- a/usr.bin/xinstall/install.1 +++ b/usr.bin/xinstall/install.1 @@ -208,7 +208,7 @@ is decided by .Xr mkstemp 3 , are created in the target directory. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY Historically diff --git a/usr.sbin/ac/ac.8 b/usr.sbin/ac/ac.8 index 4e4c8665f2..3f6a636cc9 100644 --- a/usr.sbin/ac/ac.8 +++ b/usr.sbin/ac/ac.8 @@ -125,7 +125,7 @@ to be charged out at a different rate than .It Pa /var/log/wtmp connect time accounting file .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr login 1 , diff --git a/usr.sbin/btxld/btxld.8 b/usr.sbin/btxld/btxld.8 index 238118ebcc..df2cf839b2 100644 --- a/usr.sbin/btxld/btxld.8 +++ b/usr.sbin/btxld/btxld.8 @@ -89,7 +89,7 @@ where may be 0, and should not exceed the number of pages occupied by the combined .text and .data segments of the client image. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr ld 1 , diff --git a/usr.sbin/chown/chgrp.1 b/usr.sbin/chown/chgrp.1 index fe2181dae6..fc10a0ee3b 100644 --- a/usr.sbin/chown/chgrp.1 +++ b/usr.sbin/chown/chgrp.1 @@ -127,7 +127,7 @@ or be the super-user. .It Pa /etc/group group ID file .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY In previous versions of this system, symbolic links did not have groups. diff --git a/usr.sbin/chown/chown.8 b/usr.sbin/chown/chown.8 index b9ae1f9256..80e6df79ce 100644 --- a/usr.sbin/chown/chown.8 +++ b/usr.sbin/chown/chown.8 @@ -145,7 +145,7 @@ group name. .Pp The ownership of a file may only be altered by a super-user for obvious security reasons. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh COMPATIBILITY Previous versions of the diff --git a/usr.sbin/kgzip/kgzip.8 b/usr.sbin/kgzip/kgzip.8 index 8129698028..655e93ea2c 100644 --- a/usr.sbin/kgzip/kgzip.8 +++ b/usr.sbin/kgzip/kgzip.8 @@ -121,7 +121,7 @@ CRC and size values. .It Pa /usr/lib/kgzldr.o The default loader .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr gzip 1 , diff --git a/usr.sbin/makewhatis/makewhatis.8 b/usr.sbin/makewhatis/makewhatis.8 index 977c4d9fb5..5178549558 100644 --- a/usr.sbin/makewhatis/makewhatis.8 +++ b/usr.sbin/makewhatis/makewhatis.8 @@ -112,7 +112,7 @@ environment variable is not set. .It Pa */man/whatis The default output file. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr apropos 1 , diff --git a/usr.sbin/mtree/mtree.8 b/usr.sbin/mtree/mtree.8 index 8254270456..08326246fc 100644 --- a/usr.sbin/mtree/mtree.8 +++ b/usr.sbin/mtree/mtree.8 @@ -293,6 +293,8 @@ option is used. .It Pa /etc/mtree system specification directory .El +.Sh EXIT STATUS +.Ex -std .Sh EXAMPLES To detect system binaries that have been ``trojan horsed'', it is recommended that @@ -335,8 +337,6 @@ style BSD.*.dist file, use .Fl n .Fl k .Cm uname,gname,mode,nochange . -.Sh DIAGNOSTICS -.Ex -std .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , diff --git a/usr.sbin/ngctl/ngctl.8 b/usr.sbin/ngctl/ngctl.8 index c32a5f9df7..5c421a93ab 100644 --- a/usr.sbin/ngctl/ngctl.8 +++ b/usr.sbin/ngctl/ngctl.8 @@ -123,7 +123,7 @@ The .Dq help command displays the available commands, their usage and aliases, and a brief description. -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr netgraph 3 , diff --git a/usr.sbin/rtadvd/rtadvd.8 b/usr.sbin/rtadvd/rtadvd.8 index badbf035cf..ffdb3615b8 100644 --- a/usr.sbin/rtadvd/rtadvd.8 +++ b/usr.sbin/rtadvd/rtadvd.8 @@ -182,7 +182,7 @@ in which .Nm dumps its internal state. .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr rtadvd.conf 5 , diff --git a/usr.sbin/rtsold/rtsold.8 b/usr.sbin/rtsold/rtsold.8 index 23bc765ea0..9540f0e340 100644 --- a/usr.sbin/rtsold/rtsold.8 +++ b/usr.sbin/rtsold/rtsold.8 @@ -190,7 +190,7 @@ the pid of the currently running dumps internal state on. .El .\" -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std rtsold rtsol .\" .Sh SEE ALSO diff --git a/usr.sbin/sa/sa.8 b/usr.sbin/sa/sa.8 index 3ebb57bb29..be988c54fa 100644 --- a/usr.sbin/sa/sa.8 +++ b/usr.sbin/sa/sa.8 @@ -204,7 +204,7 @@ per-command accounting summary database .It Pa /var/account/usracct per-user accounting summary database .El -.Sh DIAGNOSTICS +.Sh EXIT STATUS .Ex -std .Sh SEE ALSO .Xr lastcomm 1 , -- 2.41.0