sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 22921a859f1410afc65c5433c8ebdae58b326315
parent dbbac61fc4e83bb9abe22e91d6ab2c4c3d1b605e
Author: Michael Forney <mforney@mforney.org>
Date:   Sun,  1 Mar 2020 14:37:31 -0800

Fix various lint warnings in manuals

Fix "new sentence, new line" warnings throughout so that formatters
can produce correct spacing between sentences.

join.1
  Remove unnecessary Ns macros. These are not necessary for delimeters,
  which get special treatment.

xinstall.1
  Fix date in manual. The contents were last modified on 2016-12-03,
  so use that instead of the invalid date.

grep.1
  Fix escape sequence for `\<` and `\>`.

ed.1
  Remove spurious `\\n` escape for the null-command.

Diffstat:
Mcal.1 | 10++++++----
Mcat.1 | 3++-
Mchgrp.1 | 3++-
Mchmod.1 | 3++-
Mchown.1 | 3++-
Mcmp.1 | 3++-
Mcols.1 | 4++--
Mcp.1 | 7++++---
Mcut.1 | 18++++++++++--------
Mdate.1 | 10++++++----
Mdu.1 | 6++++--
Med.1 | 180+++++++++++++++++++++++++++++++++++++++++++++----------------------------------
Mexpr.1 | 8+++++---
Mfind.1 | 57+++++++++++++++++++++++++++++++++------------------------
Mflock.1 | 13++++++++-----
Mfold.1 | 3++-
Mgrep.1 | 21++++++++++++---------
Mhead.1 | 3++-
Mjoin.1 | 28+++++++++++++++-------------
Mlogger.1 | 3++-
Mls.1 | 7++++---
Mmkdir.1 | 3++-
Mmkfifo.1 | 3++-
Mmktemp.1 | 16++++++++++------
Mnl.1 | 15++++++++++-----
Mod.1 | 9++++++---
Mprintenv.1 | 3++-
Mpwd.1 | 3++-
Mrev.1 | 6+++---
Msed.1 | 73++++++++++++++++++++++++++++++++++++++++++++-----------------------------
Mseq.1 | 3++-
Msort.1 | 8+++++---
Mstrings.1 | 6++++--
Msync.1 | 4++--
Mtail.1 | 10++++++----
Mtar.1 | 8++++----
Mtftp.1 | 15+++++++++------
Mtouch.1 | 3++-
Mtsort.1 | 11++++++-----
Muname.1 | 3++-
Muniq.1 | 6++++--
Muudecode.1 | 7++++---
Mxargs.1 | 19++++++++++---------
Mxinstall.1 | 24+++++++++++++-----------
44 files changed, 381 insertions(+), 270 deletions(-)

diff --git a/cal.1 b/cal.1 @@ -27,18 +27,20 @@ year to stdout. The date formatting is according to .Xr localtime 3 . .Pp -The Julian calendar is used until Sep 2, 1752. The Gregorian calendar is used -starting the next day on Sep 14, 1752. +The Julian calendar is used until Sep 2, 1752. +The Gregorian calendar is used starting the next day on Sep 14, 1752. .Sh OPTIONS .Bl -tag -width Ds .It Fl 1 -Print current month. This is the default. +Print current month. +This is the default. .It Fl 3 Print previous, current and next month. .It Fl c Ar num Print .Ar num -calendars in a row. The default is 3. +calendars in a row. +The default is 3. .It Fl f Ar num Set .Ar num diff --git a/cat.1 b/cat.1 @@ -12,7 +12,8 @@ .Nm reads each .Ar file -in sequence and writes it to stdout. If no +in sequence and writes it to stdout. +If no .Ar file is given .Nm diff --git a/chgrp.1 b/chgrp.1 @@ -34,7 +34,8 @@ if it is a symbolic link. .It Fl L Dereference all symbolic links. .It Fl P -Preserve symbolic links. This is the default. +Preserve symbolic links. +This is the default. .El .Sh SEE ALSO .Xr chmod 1 , diff --git a/chmod.1 b/chmod.1 @@ -69,7 +69,8 @@ if it is a symbolic link. .It Fl L Dereference all symbolic links. .It Fl P -Preserve symbolic links. This is the default. +Preserve symbolic links. +This is the default. .El .Sh SEE ALSO .Xr chgrp 1 , diff --git a/chown.1 b/chown.1 @@ -45,7 +45,8 @@ if it is a symbolic link. .It Fl L Dereference all symbolic links. .It Fl P -Preserve symbolic links. This is the default. +Preserve symbolic links. +This is the default. .El .Sh SEE ALSO .Xr chmod 1 , diff --git a/cmp.1 b/cmp.1 @@ -14,7 +14,8 @@ compares .Ar file1 and .Ar file2 -byte by byte. If they differ, +byte by byte. +If they differ, .Nm writes the first differing byte- and line-number to stdout. .Sh OPTIONS diff --git a/cols.1 b/cols.1 @@ -24,8 +24,8 @@ reads from stdin. .Pp By default .Nm cols -tries to figure out the width of the output -device. If that fails, it defaults to 65 chars. +tries to figure out the width of the output device. +If that fails, it defaults to 65 chars. .Sh OPTIONS .Bl -tag -width Ds .It Fl c Ar num diff --git a/cp.1 b/cp.1 @@ -27,7 +27,8 @@ has to be a directory. .Sh OPTIONS .Bl -tag -width Ds .It Fl a -Preserve block devices, character devices, sockets and FIFOs. Implies +Preserve block devices, character devices, sockets and FIFOs. +Implies .Fl p , .Fl P and @@ -55,8 +56,8 @@ Preserve symbolic links. This is the default with .Fl R . .It Fl R -Traverse directories recursively. If this flag is not specified, directories -are not copied. +Traverse directories recursively. +If this flag is not specified, directories are not copied. .El .Sh SEE ALSO .Xr mv 1 diff --git a/cut.1 b/cut.1 @@ -33,9 +33,10 @@ reads from stdin. .Pp .Ar list is a comma or space separated list of numbers and ranges starting -from 1. Ranges have the form 'N-M'. If N or M is missing, -beginning or end of line is assumed. Numbers and ranges -may be repeated, overlapping and in any order. +from 1. +Ranges have the form 'N-M'. If N or M is missing, beginning or end +of line is assumed. +Numbers and ranges may be repeated, overlapping and in any order. .Pp Selected input is written in the same order it is read and is written exactly once. @@ -47,16 +48,17 @@ specifies byte | character positions. .It Fl d Ar delim Use .Ar delim -as field delimiter, which can be an arbitrary string. Default is '\et'. +as field delimiter, which can be an arbitrary string. +Default is '\et'. .It Fl f Ar list .Ar list -specifies field numbers. Lines not containing field -delimiters are passed through, unless +specifies field numbers. +Lines not containing field delimiters are passed through, unless .Fl s is specified. .It Fl n -Do not split multibyte characters. A character is written when its -last byte is selected. +Do not split multibyte characters. +A character is written when its last byte is selected. .It Fl s Suppress lines not containing field delimiters. .El diff --git a/date.1 b/date.1 @@ -41,8 +41,8 @@ sign signals a user-defined format string using conversion specifications. .Pp An operand without a leading plus sign is interpreted as a value -for setting the system's current date and time. The canonical -representation for setting the date and time is: +for setting the system's current date and time. +The canonical representation for setting the date and time is: .Pp .Bl -tag -width Ds -compact -offset indent .It Ar mm @@ -65,12 +65,14 @@ is not, a value for .Ar yy between 69 and 99 results in a .Ar CC -value of 19. Otherwise, a +value of 19. +Otherwise, a .Ar CC value of 20 is used. .El .Pp -The century and year are optional. The default is the current year. +The century and year are optional. +The default is the current year. .Sh STANDARDS The .Nm diff --git a/du.1 b/du.1 @@ -18,7 +18,8 @@ displays the file system block usage for each .Ar file argument and for each directory in the file hierarchy rooted in directory -argument. If no +argument. +If no .Ar file is specified, the block usage of the hierarchy rooted in the current directory is displayed. @@ -43,7 +44,8 @@ recursively traversing directories. .It Fl L Always dereference symbolic links while recursively traversing directories. .It Fl P -Don't dereference symbolic links. This is the default. +Don't dereference symbolic links. +This is the default. .It Fl x Do not traverse file systems mount points. .El diff --git a/ed.1 b/ed.1 @@ -11,15 +11,17 @@ .Op Ar file .Sh DESCRIPTION .Nm -is the standard text editor. It performs line-oriented operations on a buffer; -The buffer's contents are manipulated in command mode and text is written to the -buffer in input mode. Command mode is the default. To exit input mode enter a -dot ('.') on a line of its own. +is the standard text editor. +It performs line-oriented operations on a buffer; The buffer's contents are +manipulated in command mode and text is written to the buffer in input mode. +Command mode is the default. +To exit input mode enter a dot ('.') on a line of its own. .Pp If .Nm is invoked with a file as an argument, it will simulate an edit command and read -the file's contents into a buffer. Changes to this buffer are local to +the file's contents into a buffer. +Changes to this buffer are local to .Nm until a write command is given. .Pp @@ -37,10 +39,11 @@ as a prompt when in command mode .El .Sh EXTENDED DESCRIPTION .Ss Addresses -Commands operate on addresses. Addresses are used to refer to lines -within the buffer. Address ranges may have spaces before and after the separator. -Unless otherwise specified, 0 is an invalid address. The following symbols are -valid addresses: +Commands operate on addresses. +Addresses are used to refer to lines within the buffer. +Address ranges may have spaces before and after the separator. +Unless otherwise specified, 0 is an invalid address. +The following symbols are valid addresses: .Bl -tag -width Ds .It n The nth line. @@ -57,11 +60,11 @@ The previous line. .It ^n or -n The nth previous line. .It x,y -The range of lines from x to y. The default value of x is 1, and the default -value of y is $. +The range of lines from x to y. +The default value of x is 1, and the default value of y is $. .It x;y -As above, except that the current line is set to x. Omitting x in this case uses -the current line as the default value. +As above, except that the current line is set to x. +Omitting x in this case uses the current line as the default value. .It /re/ The next line matching re. .It ?re? @@ -69,82 +72,94 @@ The last line matching re. .It 'c The line marked by c. See k below. .El -.Ss Commands. +.Ss Commands .Nm expects to see one command per line, with the following exception: commands may -be suffixed with either a list, number, or print command. These suffixed -commands are run after the command they're suffixed to has executed. +be suffixed with either a list, number, or print command. +These suffixed commands are run after the command they're suffixed to has +executed. .Pp The following is the list of commands that .Nm -knows about. The parentheses contain the default addresses that a command uses. +knows about. +The parentheses contain the default addresses that a command uses. .Bl -tag -width Ds .It (.)a -Append text after the addressed line. The dot is set to the last line -entered. If no text was entered, the dot is set to the addressed line. An -address of 0 appends to the start of the buffer. +Append text after the addressed line. +The dot is set to the last line entered. +If no text was entered, the dot is set to the addressed line. +An address of 0 appends to the start of the buffer. .It (.,.)c -Delete the addressed lines and then accept input to replace them. The dot -is set to the last line entered. If no text was entered, the dot is set to -the line before the deleted lines. +Delete the addressed lines and then accept input to replace them. +The dot is set to the last line entered. +If no text was entered, the dot is set to the line before the deleted lines. .It (.,.)d -Delete the addressed lines. If there is a line after the deleted range, the -dot is set to it. Otherwise, the dot is set to the line before the deleted range. +Delete the addressed lines. +If there is a line after the deleted range, the dot is set to it. +Otherwise, the dot is set to the line before the deleted range. .It e Ar file Delete the contents of the buffer and load in .Ar file -for editing, printing the bytes read to standard output. If no filename is -given, +for editing, printing the bytes read to standard output. +If no filename is given, .Nm -uses the currently remembered filename. The remembered filename is set to +uses the currently remembered filename. +The remembered filename is set to .Ar file for later use. .It E Ar file As above, but without warning if the current buffer has unsaved changes. .It f Ar file Set the currently remembered filename to -.Ar -file +.Ar file , or print the currently remembered filename if -.Ar -file is omitted. +.Ar file +is omitted. .It (1,$)g/re/command -Apply command to lines matching re. The dot is set to the matching line before -command is executed. When each matching line has been operated on, the dot is -set to the last line operated on. If no lines match then the dot remains -unchanged. The command used may not be g, G, v, or V. +Apply command to lines matching re. +The dot is set to the matching line before command is executed. +When each matching line has been operated on, the dot is set to the last line +operated on. +If no lines match then the dot remains unchanged. +The command used may not be g, G, v, or V. .It (1,$)G/re/ -Interactively edit the range of line addresses that match re. The dot is set to -the matching line and printed before a command is input. When each matching line -has been operated on, the dot is set to the last line operated on. If no lines -match then the dot remains unchanged. The command used may not be a, c, i, g, -G, v, or V. +Interactively edit the range of line addresses that match re. +The dot is set to the matching line and printed before a command is input. +When each matching line has been operated on, the dot is set to the last line +operated on. +If no lines match then the dot remains unchanged. +The command used may not be a, c, i, g, G, v, or V. .It h Print the reason for the most recent error. .It H -Toggle error explanations. If on, the above behaviour is produced on all -subsequent errors. +Toggle error explanations. +If on, the above behaviour is produced on all subsequent errors. .It (.)i -Insert text into the buffer before the addressed line. The dot is set to the -last line entered. If no text was entered, the dot is set to the addressed line +Insert text into the buffer before the addressed line. +The dot is set to the last line entered. +If no text was entered, the dot is set to the addressed line .It (.,.+1)j -Join two lines together. If only one address is given, nothing happens. The dot -is set to the newly joined line. +Join two lines together. +If only one address is given, nothing happens. +The dot is set to the newly joined line. .It (.)kc Mark the line with the lower case character c. The dot is unchanged. .It (.,.)l -Unambiguously print the addressed lines. The dot is set to the last line written. +Unambiguously print the addressed lines. +The dot is set to the last line written. .It (.,.)m(.) -Move lines in the buffer to the line address on the right hand side. An address -of 0 on the right hand side moves to the start of the buffer. The dot is set to -the last line moved. +Move lines in the buffer to the line address on the right hand side. +An address of 0 on the right hand side moves to the start of the buffer. +The dot is set to the last line moved. .It (.,.)n -Print the addressed lines and their numbers. The dot is set to the last line -printed. +Print the addressed lines and their numbers. +The dot is set to the last line printed. .It (.,.)p -Print the addressed lines. The dot is set to the last line printed. +Print the addressed lines. +The dot is set to the last line printed. .It P -Toggle the prompt. Defaults to off, but is switched on if the -p flag is used. +Toggle the prompt. +Defaults to off, but is switched on if the -p flag is used. .It q Quit .Nm @@ -155,22 +170,25 @@ As above, but without warning if the current buffer has unsaved changes. Read in .Ar file and append it to the current buffer, printing the bytes read to standard output. -The currently remembered filename isn't changed unless it's empty. An address of -0 reads the file into the start of the buffer. +The currently remembered filename isn't changed unless it's empty. +An address of 0 reads the file into the start of the buffer. .It (.,.)s/re/replacement/flags -Substitute re for replacement in lines matching re. An & within replacement is -replaced with the whole string matched by re. Backrefs can be used with the form -\\n, where n is a positive non-zero integer. When % is the only character in -replacement, it is substituted for the replacement string from the last -substitute command. If a newline is part of replacement then the matched string -is split into two lines; this cannot be done as part of a g or v command. If -flags contains an integer n, then the nth match is replaced. If flags contains -g, all matches are replaced. The dot is set to the last line matched. +Substitute re for replacement in lines matching re. +An & within replacement is replaced with the whole string matched by re. +Backrefs can be used with the form \\n, where n is a positive non-zero integer. +When % is the only character in replacement, it is substituted for the +replacement string from the last substitute command. +If a newline is part of replacement then the matched string is split into two +lines; this cannot be done as part of a g or v command. +If flags contains an integer n, then the nth match is replaced. +If flags contains g, all matches are replaced. +The dot is set to the last line matched. .It (.,.)t(.) -As m, but copying instead of moving. The dot is set to the last line added. +As m, but copying instead of moving. +The dot is set to the last line added. .It u -Undo the last change. The dot is set to whatever it was before the undone -command was performed. +Undo the last change. +The dot is set to whatever it was before the undone command was performed. .It (1.$)v/re/command As with g, but operating on lines that don't match re. .It (1.$)V/re/ @@ -179,30 +197,36 @@ As with G, but operating on lines that don't match re. Write the addressed lines to .Ar file , overwriting its previous contents if the file exists, and print the number of -bytes written. If no filename is given the currently remembered filename will be -used instead. The dot is unchanged. +bytes written. +If no filename is given the currently remembered filename will be used instead. +The dot is unchanged. .It (1,$)W Ar file As above, but instead of overwriting the contents of .Ar file the addressed lines are appended to .Ar file instead. -.It (.+1)\\n -Print the addressed line. Sets the dot to that line. +.It (.+1) +Print the addressed line. +Sets the dot to that line. .It ($)= -Print the line number of the addressed line. The dot is unchanged. +Print the line number of the addressed line. +The dot is unchanged. .It & Repeat the last command. .It ! Ar command Execute .Ar command -using sh. If the first character of +using sh. +If the first character of .Ar command -is '!' then it is replaced with the text of the previous command. An unescaped % -is replaced with the currently remembered filename. ! does not process escape -characters. When +is '!' then it is replaced with the text of the previous command. +An unescaped % is replaced with the currently remembered filename. +! does not process escape characters. +When .Ar command -returns a '!' is printed. The dot is unchanged. +returns a '!' is printed. +The dot is unchanged. .El .Sh SEE ALSO .Xr sed 1 , diff --git a/expr.1 b/expr.1 @@ -22,7 +22,8 @@ Let be a non-elemental expression and .Sy expr1 , .Sy expr2 -arbitrary expressions. Then +arbitrary expressions. +Then .Sy expr has the recursive form .Sy expr = [(] expr1 operand expr2 [)]. @@ -76,8 +77,9 @@ against is anchored with an implicit '^'. .Pp You can't directly match the empty string, since zero matched characters -resolve equally to a failed match. To work around this limitation, use -"expr X'' : 'X$' instead of "expr '' : '$'" +resolve equally to a failed match. +To work around this limitation, use "expr X'' : 'X$' instead of "expr '' +: '$'" .El .Sh EXIT STATUS .Bl -tag -width Ds diff --git a/find.1 b/find.1 @@ -26,9 +26,9 @@ Dereference all symbolic links encountered. .El .Sh EXTENDED DESCRIPTION .Ar expression -is a combination of the following primaries and boolean operators. In -the following descriptions the number n can be replaced by +n, n, or -n, -to mean more than, exactly, or less than n respectively. +is a combination of the following primaries and boolean operators. +In the following descriptions the number n can be replaced by +n, n, or +-n, to mean more than, exactly, or less than n respectively. .Ss Primaries .Bl -tag -width Ds .It Fl name Ar pattern @@ -40,14 +40,18 @@ True if the file belongs to a user for which getpwuid() returns NULL. .It Fl nogroup True if the file belongs to a group for which getgrgid() returns NULL. .It Fl xdev -True. Do not enter directory on a different device. +True. +Do not enter directory on a different device. .It Fl prune -True. Do not enter directory. +True. +Do not enter directory. .It Fl perm Ar mode -True if permissions on the file match mode. Mode is a symbolic mode -as used in chmod. A leading '-' in mode checks that at least all bits -in mode are set in permissions for file. Without the leading '-' the -permissions for file must exactly match mode. +True if permissions on the file match mode. +Mode is a symbolic mode as used in chmod. +A leading '-' in mode checks that at least all bits in mode are set in +permissions for file. +Without the leading '-' the permissions for file must exactly match +mode. .It Fl type Ar t True if file is of type specified by .Ar t . @@ -96,22 +100,27 @@ True if file modified time is days. .It Fl exec Ar cmd [arg ...] \&; Execute cmd with given arguments, replacing each {} in argument list -with the current file. True if cmd exits with status 0. +with the current file. +True if cmd exits with status 0. .It Fl exec Ar cmd [arg ...] {} + -True. Add as many files as possible to argument list and execute when -the list is full or all files have been found. +True. +Add as many files as possible to argument list and execute when the list +is full or all files have been found. .It Fl ok Ar cmd [arg ...] \&; Prompt the user on each file encountered whether or not to execute cmd -as with -exec. True if the user responds yes and cmd exits with status 0, -false otherwise. +as with -exec. +True if the user responds yes and cmd exits with status 0, false +otherwise. .It Fl print -True. Print the path to the current file. +True. +Print the path to the current file. .It Fl newer Ar file True if the modification time of the current file is newer than that of the provided file. .It Fl depth -True. Causes find to evaluate files within in a directory before the -directory itself. +True. +Causes find to evaluate files within in a directory before the directory +itself. .El .Ss Operators In order of decreasing precedence @@ -121,15 +130,15 @@ True if expression is true. .It Ar \&! expression True if expression if false. .It Ar expression [ Fl a ] Ar expression -True if both expressions are true. Second expression is not evaluated -if first expression is false. +True if both expressions are true. +Second expression is not evaluated if first expression is false. .Fl a is implied if there is no operator between primaries. .It Ar expression Fl o Ar expression -True if either expression is true. Second expression is not evaluated -if first expression is true. +True if either expression is true. +Second expression is not evaluated if first expression is true. .El .Pp -If no expression is supplied, -print is used. If an expression is supplied -but none of -print, -exec, or -ok is supplied, then -a -print is appended -to the expressions. +If no expression is supplied, -print is used. +If an expression is supplied but none of -print, -exec, or -ok is +supplied, then -a -print is appended to the expressions. diff --git a/flock.1 b/flock.1 @@ -11,15 +11,17 @@ .Ar cmd Op arg ... .Sh DESCRIPTION .Nm -is used to manage advisory locks on open files. It is commonly used to prevent -long running cron jobs from running in parallel. If +is used to manage advisory locks on open files. +It is commonly used to prevent long running cron jobs from running in +parallel. +If .Ar file does not exist, it will be created. .Sh OPTIONS .Bl -tag -width Ds .It Fl n -Set non-blocking mode on the lock. Fail immediately if the lock -cannot be acquired. +Set non-blocking mode on the lock. +Fail immediately if the lock cannot be acquired. .It Fl o Close the file descriptor before exec to avoid having the exec'ed program holding on to the lock. @@ -28,5 +30,6 @@ Acquire a shared lock. .It Fl u Release the lock. .It Fl x -Acquire an exclusive lock. This is the default. +Acquire an exclusive lock. +This is the default. .El diff --git a/fold.1 b/fold.1 @@ -28,7 +28,8 @@ at the last space within width. .It Fl w Ar num | Fl Ns Ar num Break at .Ar num -characters. The default is 80. +characters. +The default is 80. .El .Sh STANDARDS The diff --git a/grep.1 b/grep.1 @@ -17,7 +17,8 @@ searches the input files for lines that match the .Ar pattern , a regular expression as defined in .Xr regex 7 . -By default each matching line is printed to stdout. If no +By default each matching line is printed to stdout. +If no .Ar file is given .Nm @@ -27,11 +28,12 @@ reads from stdin. .It Fl E Match using extended regex. .It Fl F -Match using fixed strings. Treat each pattern specified as a string instead of -a regular expression. +Match using fixed strings. +Treat each pattern specified as a string instead of a regular +expression. .It Fl H -Prefix each matching line with its filename in the output. This is the -default when there is more than one file specified. +Prefix each matching line with its filename in the output. +This is the default when there is more than one file specified. .It Fl c Print only a count of matching lines. .It Fl e Ar pattern @@ -41,9 +43,10 @@ This option is most useful when multiple -e options are used to specify multiple patterns, or when a pattern begins with a dash. .It Fl f Ar file Read one or more patterns from the file named by the pathname file. -Patterns in file shall be terminated by a <newline>. A null pattern can be -specified by an empty line in pattern_file. Unless the -E or -F option is -also specified, each pattern shall be treated as a BRE. +Patterns in file shall be terminated by a <newline>. +A null pattern can be specified by an empty line in pattern_file. +Unless the -E or -F option is also specified, each pattern shall be +treated as a BRE. (`-'). .It Fl h Do not prefix each line with 'filename:' prefix. @@ -63,7 +66,7 @@ Select lines which do .Sy not match the pattern. .It Fl w -The expression is searched for as a word (as if surrounded by '\<' and '\>'). +The expression is searched for as a word (as if surrounded by '\\<' and '\\>'). .It Fl x Consider only input lines that use all characters in the line excluding the terminating <newline> to match an entire fixed string or regular expression to diff --git a/head.1 b/head.1 @@ -27,7 +27,8 @@ Display initial .Ar num | .Sy N -lines. Default is 10. +lines. +Default is 10. .El .Sh SEE ALSO .Xr tail 1 diff --git a/join.1 b/join.1 @@ -19,8 +19,8 @@ lines from .Ar file1 and .Ar file2 -on a matching field. If one of the input files is '-', standard input -is read for that file. +on a matching field. +If one of the input files is '-', standard input is read for that file. .Pp Files are read sequentially and are assumed to be sorted on the join field. @@ -31,9 +31,9 @@ produce unexpected output. By default, input lines are matched on the first blank-separated field; output lines are space-separated and consist of the join field followed by the remaining fields from -.Ar file1 Ns , +.Ar file1 , then the remaining fields from -.Ar file2 Ns . +.Ar file2 . .Sh OPTIONS .Bl -tag -width Ds .It Fl 1 Ar field @@ -50,12 +50,12 @@ Print unpairable lines from file in addition to normal output. .It Fl e Ar string When used with -.Fl o Ns , +.Fl o , replace empty fields in the output list with -.Ar string Ns . +.Ar string . .It Fl o Ar list Format output according to the string -.Ar list Ns . +.Ar list . Each element of .Ar list may be either @@ -63,22 +63,24 @@ may be either or 0 (representing the join field). Elements in .Ar list -may be separated by blanks or commas. For example, +may be separated by blanks or commas. +For example, .Bd -literal -offset indent join -o "0 2.1 1.3" .Ed .Pp would print the join field, the first field of -.Ar file2 Ns , +.Ar file2 , then the third field of -.Ar file1 Ns . +.Ar file1 . .Pp Only paired lines are formatted with the .Fl o -option. Unpairable lines (selected with +option. +Unpairable lines (selected with .Fl a or -.Fl v Ns ) +.Fl v ) are printed raw. .It Fl t Ar delim Use the arbitrary string @@ -98,7 +100,7 @@ specification with the following exeption: .Bl -bullet -offset indent .It Unpairable lines ignore formatting specified with -.Fl o Ns . +.Fl o . .El .Pp The possibility of specifying multibyte delimiters of arbitrary diff --git a/logger.1 b/logger.1 @@ -31,7 +31,8 @@ Set the message .Ar priority given symbolically as a .Dq facility.level -pair. The default is +pair. +The default is .Dq user.notice . .It Fl s Also log to stderr. diff --git a/ls.1 b/ls.1 @@ -18,8 +18,8 @@ .Op Ar file ... .Sh DESCRIPTION .Nm -lists each given file, and the contents of each given directory. If no files -are given the current directory is listed. +lists each given file, and the contents of each given directory. +If no files are given the current directory is listed. .Sh OPTIONS .Bl -tag -width Ds .It Fl A @@ -67,7 +67,8 @@ Append a file type indicator to directories. .It Fl q Replace non-printable characters in filenames with '?'. .It Fl R -List directory content recursively. The +List directory content recursively. +The .Fl 1 flag is set implicitly. .It Fl r diff --git a/mkdir.1 b/mkdir.1 @@ -19,7 +19,8 @@ if it does not already exist. .It Fl m Set the file .Ar mode -of newly created directories. See +of newly created directories. +See .Xr chmod 1 . .It Fl p Also create necessary parent directories and diff --git a/mkfifo.1 b/mkfifo.1 @@ -18,7 +18,8 @@ if it does not already exist. .It Fl m Set the file .Ar mode -of newly created named pipes. See +of newly created named pipes. +See .Xr chmod 1 . .El .Sh SEE ALSO diff --git a/mktemp.1 b/mktemp.1 @@ -13,7 +13,8 @@ .Nm creates a temporary file by generating a unique filename with .Ar template , -which has to have at least six 'X's appended to it. If no +which has to have at least six 'X's appended to it. +If no .Ar template is specified, a default of 'tmp.XXXXXXXXXX' is used and the tmpdir set to '/tmp' or, if set, the TMPDIR environment variable. @@ -24,10 +25,11 @@ Create a temporary directory instead of a file. .It Fl p Ar directory Use the specified .Ar directory -as a prefix when generating the temporary filename. The directory will be -overridden by the user's +as a prefix when generating the temporary filename. +The directory will be overridden by the user's .Ev TMPDIR -environment variable if it is set. This option implies the +environment variable if it is set. +This option implies the .Fl t flag (see below). .It Fl q @@ -37,9 +39,11 @@ Generate a path rooted in a temporary directory. .It Fl u Unlink file before .Nm -exits. This is slightly better than +exits. +This is slightly better than .Xr mktemp 3 -but still introduces a race condition. Use of this option is not encouraged. +but still introduces a race condition. +Use of this option is not encouraged. .El .Sh SEE ALSO .Xr mkdtemp 3 , diff --git a/nl.1 b/nl.1 @@ -40,7 +40,8 @@ All lines. .It n No lines. .It t -Only non-empty lines. This is the default. +Only non-empty lines. +This is the default. .It p Ns Ar expr Only lines matching .Ar expr @@ -50,11 +51,13 @@ according to .It Fl d Ar delim Set .Ar delim -as the delimiter for logical pages. If +as the delimiter for logical pages. +If .Ar delim is only one character, .Nm -appends ":" to it. The default is "\e:". +appends ":" to it. +The default is "\e:". .It Fl i Ar num Set the increment between numbered lines to .Ar num . @@ -70,14 +73,16 @@ to one of: .It ln Left justified. .It rn -Right justified. This is the default. +Right justified. +This is the default. .It rz Right justified with leading zeroes. .El .It Fl s Ar sep Use .Ar sep -to separate line numbers and lines. The default is "\et". +to separate line numbers and lines. +The default is "\et". .It Fl v Ar num Start counting lines from .Ar num . diff --git a/od.1 b/od.1 @@ -16,7 +16,8 @@ .Nm writes an octal dump of each .Ar file -to stdout. If no +to stdout. +If no .Ar file is given .Nm @@ -27,7 +28,8 @@ reads from stdin. .Ar addressformat is one of d|o|x|n and sets the address to be either in \fId\fRecimal, \fIo\fRctal, he\fIx\fRadecimal or \fIn\fRot -printed at all. The default is octal. +printed at all. +The default is octal. .It Fl E | e Force Little Endian .Fl ( e ) @@ -59,7 +61,8 @@ he\fIx\fRadecimal format, processing the given amount of bytes or the length of \fIC\fRhar, \fIS\fRhort, \fII\fRnteger or \fIL\fRong. The default is octal with 4 bytes. .It Fl v -Always set. Write all input data, including duplicate lines. +Always set. +Write all input data, including duplicate lines. .It Fl x Equivalent to .Fl t x2 . diff --git a/printenv.1 b/printenv.1 @@ -11,7 +11,8 @@ .Nm prints the entire environment as key=value pairs if no .Ar var -is given. Otherwise, +is given. +Otherwise, .Nm prints only the value of each .Ar var diff --git a/pwd.1 b/pwd.1 @@ -13,7 +13,8 @@ prints the path of the current working directory. .Sh OPTIONS .Bl -tag -width Ds .It Fl L -Logical path, uses $PWD. This is the default. +Logical path, uses $PWD. +This is the default. .It Fl P Physical path, avoids all symlinks. .El diff --git a/rev.1 b/rev.1 @@ -11,9 +11,9 @@ .Nm reads each .Ar file -in sequence and writes it to stdout, but -with all characters in each line in reverse -order. If no +in sequence and writes it to stdout, but with all characters in each +line in reverse order. +If no .Ar file is given .Nm diff --git a/sed.1 b/sed.1 @@ -56,46 +56,57 @@ Editing commands take the form .Ss Addresses Addresses are either blank, a positive decimal integer denoting a line number, the character '$' denoting the last line of input, or a regular -expression. A command with no addresses matches every line, one address -matches individual lines, and two addresses matches a range of lines -from the first to the second address inclusive. +expression. +A command with no addresses matches every line, one address matches +individual lines, and two addresses matches a range of lines from the +first to the second address inclusive. .Ss Functions .Bl -tag -width Ds .It Ar a Op Ar text Append text to output after end of current cycle. .It Ar b Op Ar label -Branch to label. If no label is provided branch to end of script. +Branch to label. +If no label is provided branch to end of script. .It Ar c Op Ar text -Change. Delete addressed range and output text after end of current cycle. +Change. +Delete addressed range and output text after end of current cycle. .It Ar d Delete pattern space and begin next cycle. .It Ar D Delete pattern space up to and including first newline and begin new -cycle without reading input. If there is no newline, behave like d. +cycle without reading input. +If there is no newline, behave like d. .It Ar g -Get. Replace the pattern space with the hold space. +Get. +Replace the pattern space with the hold space. .It Ar G -Get. Append a newline and the hold space to the pattern space. +Get. +Append a newline and the hold space to the pattern space. .It Ar h -Hold. Replace the hold space with the pattern space. +Hold. +Replace the hold space with the pattern space. .It Ar H -Hold. Append a newline and the pattern space to the hold space. +Hold. +Append a newline and the pattern space to the hold space. .It Ar i Op Ar text Insert text in output. .It Ar l List? Write the pattern space replacing known non printing characters with -backslash escaped versions (\\\\, \\a, \\b, \\f, \\r, \\t, \\v). Print -bad UTF-8 sequences as \\ooo where ooo is a three digit octal number. Mark -end of lines with '$'. +backslash escaped versions (\\\\, \\a, \\b, \\f, \\r, \\t, \\v). +Print bad UTF-8 sequences as \\ooo where ooo is a three digit octal +number. +Mark end of lines with '$'. .It Ar n -Next. Write pattern space (unless +Next. +Write pattern space (unless .Fl n ) , -read next line into pattern space, and continue current cycle. If there -is no next line, quit. +read next line into pattern space, and continue current cycle. +If there is no next line, quit. .It Ar N -Next. Read next line, append newline and next line to pattern space, -and continue cycle. If there is no next line, quit without printing -current pattern space. +Next. +Read next line, append newline and next line to pattern space, and +continue cycle. +If there is no next line, quit without printing current pattern space. .It Ar p Print current pattern space. .It Ar P @@ -105,12 +116,14 @@ Quit. .It Ar r file Read file and write contents to output. .It Ar s/re/text/flags -Find occurences of regular expression re in the pattern space and replace -with text. A '&' in text is replaced with the entire match. A \\d where -d is a decimal digit 1-9 is replaced with the corresponding match group -from the regular expression. \\n represents a newline in both the regular -expression and replacement text. A literal newline in the replacement -text must be preceded by a \\. +Find occurences of regular expression re in the pattern space and +replace with text. +A '&' in text is replaced with the entire match. +A \\d where d is a decimal digit 1-9 is replaced with the corresponding +match group from the regular expression. +\\n represents a newline in both the regular expression and replacement +text. +A literal newline in the replacement text must be preceded by a \\. .Pp Flags are .Bl -tag -width Ds @@ -118,16 +131,18 @@ Flags are A positive decimal number denoting which match in the pattern space to replace. .It Ar g -Global. Replace all matches in the pattern space. +Global. +Replace all matches in the pattern space. .It Ar p Print the pattern if a replacement was made. .It Ar w file Write the pattern space to file if a replacement was made. .El .It Ar t Op Ar label -Test. Branch to corresponding labelif a substitution has been made since -the last line was read or last t command was executed. If no label is -provided branch to end of script. +Test. +Branch to corresponding label if a substitution has been made since the +last line was read or last t command was executed. +If no label is provided branch to end of script. .It Ar w file Write pattern space to file. .It Ar x diff --git a/seq.1 b/seq.1 @@ -31,7 +31,8 @@ as the output line format according to .It Fl s Ar sep Print .Ar sep -between output lines. The default is "\en". +between output lines. +The default is "\en". .It Fl w Print out lines in equal width. .El diff --git a/sort.1 b/sort.1 @@ -26,8 +26,9 @@ reads from stdin. .It Fl C Check that the concatenation of the given .Ar files -is sorted rather than sorting them. In this mode, no output is printed to -stdout, and the exit status indicates the result of the check. +is sorted rather than sorting them. +In this mode, no output is printed to stdout, and the exit status +indicates the result of the check. .It Fl b Skip leading whitespace of columns when sorting. .It Fl c @@ -62,7 +63,8 @@ where and .Sy e are the starting column, starting character in that column, ending column and -the ending character of that column respectively. If they are not specified, +the ending character of that column respectively. +If they are not specified, .Sy s refers to the first character of the specified starting column, .Sy E diff --git a/strings.1 b/strings.1 @@ -25,11 +25,13 @@ reads from stdin. .It Fl a Scan each .Ar file -entirely. This is the default. +entirely. +This is the default. .It Fl n Ar num Print sequences of at least .Ar num -characters. The default is 4. +characters. +The default is 4. .It Fl t Ar format Prepend each string with its byte offset, with .Ar format diff --git a/sync.1 b/sync.1 @@ -10,8 +10,8 @@ .Nm invokes .Xr sync 2 -to flush all unwritten changes to disk. This is -usually done before shutting down, rebooting or halting. +to flush all unwritten changes to disk. +This is usually done before shutting down, rebooting or halting. .Sh SEE ALSO .Xr fsync 2 , .Xr sync 2 diff --git a/tail.1 b/tail.1 @@ -13,7 +13,8 @@ .Nm writes the last 10 lines of each .Ar file -to stdout. If no +to stdout. +If no .Ar file is given, .Nm @@ -23,15 +24,16 @@ reads from stdin. .It Fl c Ar num | Fl m Ar num | Fl n Ar num | Fl Ns Ar num Display final .Ar num -bytes | characters | lines | -lines. If +bytes | characters | lines | lines. +If .Ar num begins with '+' it is an offset from the beginning of each .Ar file . If .Ar num -begins with '-' it is as if no sign was given. The default is 10 lines. +begins with '-' it is as if no sign was given. +The default is 10 lines. .It Fl f If one .Ar file diff --git a/tar.1 b/tar.1 @@ -32,8 +32,8 @@ before beginning. .It Fl f Ar file Set .Ar file -as input | output archive instead of stdin | stdout. If '-', -stdin | stdout is used. +as input | output archive instead of stdin | stdout. +If '-', stdin | stdout is used. .It Fl m Do not preserve modification time. .It Fl t @@ -43,8 +43,8 @@ Extract archive. .It Fl h Always dereference symbolic links while recursively traversing directories. .It Fl J | Fl Z | Fl a | Fl j | Fl z -Use xz | compress | lzma | bzip2 | gzip compression or decompression. These -utilities must be installed separately. +Use xz | compress | lzma | bzip2 | gzip compression or decompression. +These utilities must be installed separately. Using these flags is discouraged in favour of the flexibility and clarity of pipes: .Bd -literal -offset indent diff --git a/tftp.1 b/tftp.1 @@ -13,17 +13,20 @@ .Sh DESCRIPTION .Nm is a client that implements the trivial file transfer protocol over -either IPv4 or IPv6 as specified in RFC 1350. It can be used to transfer -files to and from remote machines. +either IPv4 or IPv6 as specified in RFC 1350. +It can be used to transfer files to and from remote machines. .Sh OPTIONS .Bl -tag -width Ds .It Fl h Ar host Set the remote hostname. .It Fl p Ar port -Set the remote port. It defaults to port 69. +Set the remote port. +It defaults to port 69. .It Fl x -Extract a file from the server. This is the default -if no flags are specified. Output goes to stdout. +Extract a file from the server. +This is the default if no flags are specified. +Output goes to stdout. .It Fl c -Create a file on the server. Input comes from stdin. +Create a file on the server. +Input comes from stdin. .El diff --git a/touch.1 b/touch.1 @@ -13,7 +13,8 @@ .Nm sets the access and modification time of each .Ar file -to the current time of day. If +to the current time of day. +If .Ar file doesn't exist, it is created with default permissions. .Sh OPTIONS diff --git a/tsort.1 b/tsort.1 @@ -9,12 +9,13 @@ .Op Ar file .Sh DESCRIPTION .Nm -topologically sorts a graph. The graph is read -either from +topologically sorts a graph. +The graph is read either from .Ar file -or from standard input. The result is not optimized -for any particular usage. Loops are detected and -reported to standard error, but does not stop the sort. +or from standard input. +The result is not optimized for any particular usage. +Loops are detected and reported to standard error, but does not stop the +sort. .Pp The input is a list of edges (vertex pairs), where the edge is directed from the first vertex to the diff --git a/uname.1 b/uname.1 @@ -9,7 +9,8 @@ .Op Fl amnrsv .Sh DESCRIPTION .Nm -writes system information to stdout. If no flags are given, +writes system information to stdout. +If no flags are given, .Nm implies .Fl s . diff --git a/uniq.1 b/uniq.1 @@ -18,11 +18,13 @@ reads the file and writes one copy of a line from each group of consecutive duplicate lines to the .Ar output -file. If no +file. +If no .Ar input file is given .Nm -reads from stdin. If no +reads from stdin. +If no .Ar output file is given .Nm diff --git a/uudecode.1 b/uudecode.1 @@ -14,9 +14,10 @@ reads .Ar file and writes a decoded version to the file specified in the uuencoded header. -In case the file already exists, it is truncated. Otherwise a new file is -created. The permissions of the created/accessed file are changed to -reflect the mode in the header. +In case the file already exists, it is truncated. +Otherwise a new file is created. +The permissions of the created/accessed file are changed to reflect the +mode in the header. If no .Ar file is given diff --git a/xargs.1 b/xargs.1 @@ -21,15 +21,16 @@ with the strings as .Pp Any arguments specified on the command line are given to the command upon each invocation, followed by some number of the arguments read from -stdin. The command is repeatedly executed one or more times until stdin -is exhausted. +stdin. +The command is repeatedly executed one or more times until stdin is exhausted. .Pp Spaces, tabs and newlines may be embedded in arguments using single (`'') -or double (`"') quotes or backslashes ('\\'). Single quotes escape all -non-single quote characters, excluding newlines, up to the matching single -quote. Double quotes escape all non-double quote characters, excluding -newlines, up to the matching double quote. Any single character, including -newlines, may be escaped by a backslash. +or double (`"') quotes or backslashes ('\\'). +Single quotes escape all non-single quote characters, excluding newlines, up +to the matching single quote. +Double quotes escape all non-double quote characters, excluding newlines, up +to the matching double quote. +Any single character, including newlines, may be escaped by a backslash. .Sh OPTIONS .Bl -tag -width Ds .It Fl n Ar num @@ -37,8 +38,8 @@ Use at most .Ar num arguments per command line. .It Fl r -Do not run the command if there are no arguments. Normally the command is -executed at least once even if there are no arguments. +Do not run the command if there are no arguments. +Normally the command is executed at least once even if there are no arguments. .It Fl E Ar eofstr Use .Ar eofstr diff --git a/xinstall.1 b/xinstall.1 @@ -1,4 +1,4 @@ -.Dd 2016-24-27 +.Dd 2016-12-03 .Dt INSTALL 1 .Os sbase .Sh NAME @@ -31,7 +31,8 @@ If more than one .Ar source is given .Ar dest -is treated as a directory. Otherwise +is treated as a directory. +Otherwise .Ar dest is treated as a filename. .Nm @@ -52,12 +53,13 @@ Change the installed files' group to .Ar group . This may be a group name or a group identifier. .It Fl m Ar mode -Change the file modes. Both numerical and symbolic -values are supported. See +Change the file modes. +Both numerical and symbolic values are supported. +See .Xr chmod 1 for the syntex. -Default mode 0755. If a file has the mode 0644 and -is copied with +Default mode 0755. +If a file has the mode 0644 and is copied with .It Fl o Ar owner Change the installed files' owner to .Ar owner . @@ -68,8 +70,8 @@ Copy files into the directory .Nm install , the copy's mode will be 0755 unless .Fl m -is used to select another mode. When the symbolic -notation is used, the base mode is 0000. +is used to select another mode. +When the symbolic notation is used, the base mode is 0000. .El .Sh SEE ALSO .Xr chmod 1 , @@ -79,6 +81,6 @@ notation is used, the base mode is 0000. .Sh STANDARDS The .Nm -utility is not standardized. This implementation is a subset -of the GNU implementation and a subset with extensions to -the FreeBSD implementation. +utility is not standardized. +This implementation is a subset of the GNU implementation and a subset +with extensions to the FreeBSD implementation.