add some mandoc pages and fix some warnings

- add .Os, it is mandatory.
- don't redeclare .Nm when it's not needed.
- fix some warnings (checked with mandoc -Tlint).
- remove some leftover old stuff.
This commit is contained in:
Hiltjo Posthuma 2015-01-30 21:17:58 +01:00
parent 8c177d8d83
commit 57a19e3b86
52 changed files with 231 additions and 183 deletions

View File

@ -5,7 +5,7 @@
.Nm basename
.Nd strip leading path components
.Sh SYNOPSIS
.Nm basename
.Nm
.Ar path
.Op Ar suffix
.Sh DESCRIPTION

3
cal.1
View File

@ -1,10 +1,11 @@
.Dd January 18, 2015
.Dt CAL 1 sbase\-VERSION
.Os
.Sh NAME
.Nm cal
.Nd show calendar
.Sh SYNOPSIS
.Nm cal
.Nm
.Op Fl 1 | Fl 3 | Fl y | Fl n Ar nmonths
.Op Fl s | Fl m | Fl f Ar firstday
.Op Fl c Ar columns

3
cat.1
View File

@ -1,10 +1,11 @@
.Dd January 16, 2015
.Dt CAT 1 sbase\-VERSION
.Os
.Sh NAME
.Nm cat
.Nd concatenate files
.Sh SYNOPSIS
.Nm cat
.Nm
.Op Fl u
.Op Ar file ...
.Sh DESCRIPTION

40
chgrp.1
View File

@ -1,22 +1,28 @@
.TH CHGRP 1 sbase\-VERSION
.SH NAME
chgrp \- change the file group ownership
.SH SYNOPSIS
.B chgrp
.RB [ \-R ]
.I groupname
.I file...
.SH DESCRIPTION
.B chgrp
.Dd January 30, 2015
.Dt CHGRP 1 sbase\-VERSION
.Os
.Sh NAME
.Nm chgrp
.Nd change the file group ownership
.Sh SYNOPSIS
.Nm
.Op Fl R
.Ar groupname
.Op Ar file...
.Sh DESCRIPTION
.Nm
sets the group id of the files specified by
.IR file
.Ar file
to the gid of the group named
.IR group.
.Ar group.
If the
.IR R
.Fl R
flag is specified, this process is recursively applied to
everything in
.IR file.
.SH SEE ALSO
.IR chown (1) chown (2) chmod (1) chmod (2) getgrnam (3)
.Ar file .
.Sh SEE ALSO
.Xr chown 1 ,
.Xr chown 2 ,
.Xr chmod 1 ,
.Xr chmod 2 ,
.Xr getgrnam 3

View File

@ -1,10 +1,11 @@
.Dd January 17, 2015
.Dt CHMOD 1 sbase\-VERSION
.Os
.Sh NAME
.Nm chmod
.Nd change file mode
.Sh SYNOPSIS
.Nm chmod
.Nm
.Op Fl R
.Ar mode
.Op Ar file ...

39
chown.1
View File

@ -1,20 +1,23 @@
.TH CHOWN 1 sbase\-VERSION
.SH NAME
chown \- change file ownership
.SH SYNOPSIS
.B chown
.RB [ \-Rr ]
.RI [ owner ][: group ]
.RI [ file ...]
.SH DESCRIPTION
.B chown
.Dd January 30, 2015
.Dt CHOWN 1 sbase\-VERSION
.Os
.Sh NAME
.Nm chown
.Nd change file ownership
.Sh SYNOPSIS
.Nm
.Op Fl Rr
.Op Ar owner Op Ar :group
.Op Ar file ...
.Sh DESCRIPTION
.Nm
changes the user or group ownership for the given files.
.SH OPTIONS
.TP
.B \-R
equivalent to -r.
.TP
.B \-r
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl R
equivalent to \-r.
.It Fl r
change directory ownership recursively.
.SH SEE ALSO
.IR chown (2)
.El
.Sh SEE ALSO
.Xr chown 2

View File

@ -1,26 +1,25 @@
.TH CHROOT 1 sbase\-VERSION
.SH NAME
chroot \- invoke a command with a different root directory
.SH SYNOPSIS
.B chroot
.IR dir
.RI [ command
.RI [ arg ...]]
.SH DESCRIPTION
.B chroot
.Dd January 30, 2015
.Dt CHROOT 1 sbase\-VERSION
.Os
.Sh NAME
.Nm chroot
.Nd invoke a command with a different root directory
.Sh SYNOPSIS
.Nm
.Ar dir
.Op Ar command Op Ar arg ...
.Sh DESCRIPTION
.Nm
runs
.IR command
.Ar command
after changing the root directory to
.IR dir
.Ar dir
with the
.B chroot
.Xr chroot 2
system call, and changing the working directory to the new root.
If
.IR command
.Op Ar command
is not specified, an interactive shell is started in the new root.
.SH SEE ALSO
.IR chroot (2)
.IR chdir (2)
.Sh SEE ALSO
.Xr chdir 2 ,
.Xr chroot 2

View File

@ -1,10 +1,11 @@
.Dd January 17, 2015
.Dt CKSUM 1 sbase\-VERSION
.Os
.Sh NAME
.Nm cksum
.Nd compute file checksum
.Sh SYNOPSIS
.Nm cksum
.Nm
.Op Ar file ...
.Sh DESCRIPTION
.Nm

3
cmp.1
View File

@ -5,7 +5,7 @@
.Nm cmp
.Nd compare two files
.Sh SYNOPSIS
.Nm cmp
.Nm
.Op Fl l | Fl s
.Ar file1 file2
.Sh DESCRIPTION
@ -14,7 +14,6 @@ compares two files byte by byte. If the files differ,
.Nm
prints the byte and
line number at which the difference occurred.
.Pp
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl l

2
cols.1
View File

@ -5,7 +5,7 @@
.Nm cols
.Nd columnize output
.Sh SYNOPSIS
.Nm cols
.Nm
.Op Fl c Ar chars
.Op Ar file ...
.Sh DESCRIPTION

3
comm.1
View File

@ -1,10 +1,11 @@
.Dd January 18, 2015
.Dt COMM 1 sbase\-VERSION
.Os
.Sh NAME
.Nm comm
.Nd select or reject lines common to two files
.Sh SYNOPSIS
.Nm comm
.Nm
.Op Fl 123
.Ar file1
.Ar file2

3
cron.1
View File

@ -5,13 +5,12 @@
.Nm cron
.Nd clock daemon
.Sh SYNOPSIS
.Nm cron
.Nm
.Op Fl f Ar file
.Op Fl n
.Sh DESCRIPTION
.Nm
schedules commands to be run at specified dates and times.
.Pp
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl f Ar file

7
cut.1
View File

@ -1,17 +1,18 @@
.Dd January 22, 2015
.Dt CUT 1 sbase\-VERSION
.Os
.Sh NAME
.Nm cut
.Nd extract columns of data
.Sh SYNOPSIS
.Nm cut
.Nm
.Fl b Ar list
.Op Fl n
.Op Ar file ...
.Nm cut
.Nm
.Fl c Ar list
.Op Ar file ...
.Nm cut
.Nm
.Fl f Ar list
.Op Fl d Ar delim
.Op Fl s

3
date.1
View File

@ -1,10 +1,11 @@
.Dd January 23, 2015
.Dt DATE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm date
.Nd print date and time
.Sh SYNOPSIS
.Nm date
.Nm
.Op Fl d Ar time
.Op Fl u
.Op Cm + Ns Ar format

View File

@ -1,10 +1,11 @@
.Dd January 23, 2015
.Dt DIRNAME 1 sbase\-VERSION
.Os
.Sh NAME
.Nm dirname
.Nd strip final path component
.Sh SYNOPSIS
.Nm dirname
.Nm
.Ar path
.Sh DESCRIPTION
.Nm

3
echo.1
View File

@ -1,10 +1,11 @@
.Dd January 23, 2015
.Dt ECHO 1 sbase\-VERSION
.Os
.Sh NAME
.Nm echo
.Nd print arguments
.Sh SYNOPSIS
.Nm echo
.Nm
.Op Fl n
.Op Ar string ...
.Sh DESCRIPTION

3
env.1
View File

@ -1,10 +1,11 @@
.Dd January 24, 2015
.Dt ENV 1 sbase\-VERSION
.Os
.Sh NAME
.Nm env
.Nd modify the environment, then print it or run a command
.Sh SYNOPSIS
.Nm env
.Nm
.Op Fl i
.Oo Fl u Ar variable Oc ...
.Oo Ar variable Ns = Ns Ar value Oc ...

View File

@ -1,10 +1,11 @@
.Dd January 25, 2015
.Dt EXPAND 1 sbase\-VERSION
.Os
.Sh NAME
.Nm expand
.Nd expand tabs to spaces
.Sh SYNOPSIS
.Nm expand
.Nm
.Op Fl i
.Op Fl t Ar tablist
.Op Ar file ...

3
expr.1
View File

@ -1,10 +1,11 @@
.Dd January 25, 2015
.Dt EXPR 1 sbase\-VERSION
.Os
.Sh NAME
.Nm expr
.Nd evaluate expression
.Sh SYNOPSIS
.Nm expr
.Nm
.Ar expression
.Sh DESCRIPTION
.Nm

View File

@ -1,10 +1,11 @@
.Dd January 16, 2015
.Dt FALSE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm false
.Nd return failure
.Sh SYNOPSIS
.Nm false
.Nm
.Sh DESCRIPTION
.Nm
returns a status code indicating failure.

3
fold.1
View File

@ -1,10 +1,11 @@
.Dd January 25, 2015
.Dt FOLD 1 sbase\-VERSION
.Os
.Sh NAME
.Nm fold
.Nd wrap lines to width
.Sh SYNOPSIS
.Nm fold
.Nm
.Op Fl bs
.Op Fl w Ar width
.Op Fl N

7
grep.1
View File

@ -1,10 +1,11 @@
.Dd November 21, 2014
.Dt GREP 1 sbase\-VERSION
.Os
.Sh NAME
.Nm grep
.Nd search files for patterns
.Sh SYNOPSIS
.Nm grep
.Nm
.Op Fl EFHchilnqsvx
.Op Fl e Ar pattern
.Op Fl f Ar file
@ -56,8 +57,8 @@ Print nothing, only return status.
Suppress the error messages ordinarily written for nonexistent or unreadable files.
.It Fl v
Select lines which do
.B not
Match the pattern.
.Sy not
match the pattern.
.It Fl w
The expression is searched for as a word (as if surrounded by '\<' and '\>').
.It Fl x

3
head.1
View File

@ -1,10 +1,11 @@
.Dd January 25, 2015
.Dt HEAD 1 sbase\-VERSION
.Os
.Sh NAME
.Nm head
.Nd display initial lines of files
.Sh SYNOPSIS
.Nm head
.Nm
.Op Fl n Ar num
.Op Fl N
.Op Ar file ...

12
kill.1
View File

@ -5,22 +5,20 @@
.Nm kill
.Nd signal processes
.Sh SYNOPSIS
.Nm kill
.Nm
.Op Fl s Ar signal_name
.Ar pid ...
.Nm kill
.Nm
.Fl l Op Ar exit_status
.Nm kill
.Nm
.Fl Ar signal_name
.Ar pid ...
.Nm kill
.Nm
.Fl Ar signal_number
.Ar pid ...
.Sh DESCRIPTION
.Nm
by default sends a
.I TERM
signal to the given processes.
by default sends a TERM signal to the given processes.
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl s Ar signal_name

2
link.1
View File

@ -1,7 +1,9 @@
.Dd January 25, 2015
.Dt LINK 1 sbase\-VERSION
.Os
.Sh NAME
.Nm link
.Nd call the link function
.Ar target
.Ar name
.Sh DESCRIPTION

5
ln.1
View File

@ -1,15 +1,16 @@
.Dd January 26, 2015
.Dt LN 1 sbase\-VERSION
.Os
.Sh NAME
.Nm ln
.Nd link files
.Sh SYNOPSIS
.Nm ln
.Nm
.Op Fl f
.Op Fl L | Fl P | Fl s
.Ar target
.Op Ar name
.Nm ln
.Nm
.Op Fl f
.Op Fl L | Fl P | Fl s
.Ar target ...

View File

@ -5,7 +5,7 @@
.Nm logger
.Nd make entries in the system log
.Sh SYNOPSIS
.Nm logger
.Nm
.Op Fl is
.Op Fl p Ar priority
.Op Fl t Ar tag
@ -15,7 +15,6 @@
provides a shell command interface to the
.Xr syslog 3
system log module.
.Pp
.Sh OPTIONS
.Bl -tag -width xxxxxxxxxxxx
.It Fl i

View File

@ -1,10 +1,11 @@
.Dd January 26, 2015
.Dt LOGNAME 1 sbase\-VERSION
.Os
.Sh NAME
.Nm logname
.Nd show login name
.Sh SYNOPSIS
.Nm logname
.Nm
.Sh DESCRIPTION
.Nm
writes the login name of the current user to stdout.

3
ls.1
View File

@ -1,10 +1,11 @@
.Dd January 20, 2015
.Dt LS 1 sbase\-VERSION
.Os
.Sh NAME
.Nm ls
.Nd list directory contents
.Sh SYNOPSIS
.Nm ls
.Nm
.Op Fl 1acdFHhiLlrtU
.Op Ar file ...
.Sh DESCRIPTION

View File

@ -1,10 +1,11 @@
.Dd January 26, 2015
.Dt MKDIR 1 sbase\-VERSION
.Os
.Sh NAME
.Nm mkdir
.Nd create directories
.Sh SYNOPSIS
.Nm mkdir
.Nm
.Op Fl p
.Op Fl m Ar mode
.Ar name ...

View File

@ -1,10 +1,11 @@
.Dd January 28, 2015
.Dt MKFIFO 1 sbase\-VERSION
.Os
.Sh NAME
.Nm mkfifo
.Nd create named pipes
.Sh SYNOPSIS
.Nm mkfifo
.Nm
.Op Fl m Ar mode
.Ar name ...
.Sh DESCRIPTION

3
mv.1
View File

@ -1,10 +1,11 @@
.Dd January 28, 2015
.Dt MV 1 sbase\-VERSION
.Os
.Sh NAME
.Nm mv
.Nd move files and directories
.Sh SYNOPSIS
.Nm mv
.Nm
.Op Fl f | Fl i
.Ar source ...
.Ar destination

3
nice.1
View File

@ -1,10 +1,11 @@
.Dd January 28, 2015
.Dt NICE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm nice
.Nd run command with altered niceness
.Sh SYNOPSIS
.Nm nice
.Nm
.Op Fl n Ar inc
.Ar cmd
.Op Ar arg ...

5
nl.1
View File

@ -5,7 +5,7 @@
.Nm nl
.Nd line numbering filter
.Sh SYNOPSIS
.Nm nl
.Nm
.Op Fl b Ar type
.Op Fl i Ar incr
.Op Fl s Ar sep
@ -33,8 +33,7 @@ Only non-empty lines (default).
Only lines which match
.Ar expr ,
a regular expression as defined in
.IR regex (7).
.TP
.Xr regex 7
.El
.It Fl i Ar incr
Defines the increment between numbered lines.

View File

@ -1,10 +1,11 @@
.Dd January 28, 2015
.Dt NOHUP 1 sbase\-VERSION
.Os
.Sh NAME
.Nm nohup
.Nd run command immune to hangups
.Sh SYNOPSIS
.Nm nohup
.Nm
.Ar cmd
.Op Ar arg ...
.Sh DESCRIPTION

View File

@ -1,10 +1,11 @@
.Dd January 29, 2015
.Dt PASTE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm paste
.Nd merge lines of files in parallel or sequentially
.Sh SYNOPSIS
.Nm paste
.Nm
.Op Fl s
.Op Fl d Ar list
.Ar file ...

View File

@ -39,11 +39,11 @@
.Nm printf
.Nd formatted output
.Sh SYNOPSIS
.Nm printf
.Nm
.Ar format
.Op Ar argument ...
.Sh DESCRIPTION
.Nm printf
.Nm
formats and prints its arguments, after the first, under control
of the
.Ar format .

2
pwd.1
View File

@ -5,7 +5,7 @@
.Nm pwd
.Nd print working directory
.Sh SYNOPSIS
.Nm pwd
.Nm
.Op Fl LP
.Sh DESCRIPTION
.Nm

View File

@ -1,10 +1,11 @@
.Dd January 29, 2015
.Dt RENICE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm renice
.Nd change niceness of processes
.Sh SYNOPSIS
.Nm renice
.Nm
.Fl n Ar inc
.Op Fl g | Fl p | Fl u
.Ar id ...

3
rm.1
View File

@ -1,10 +1,11 @@
.Dd January 30, 2015
.Dt RM 1 sbase\-VERSION
.Os
.Sh NAME
.Nm rm
.Nd remove directory entries
.Sh SYNOPSIS
.Nm rm
.Nm
.Op Fl f | Fl i
.Op Fl Rr
.Ar file ...

View File

@ -1,10 +1,11 @@
.Dd January 30, 2015
.Dt RMDIR 1 sbase\-VERSION
.Os
.Sh NAME
.Nm rmdir
.Nd remove directories
.Sh SYNOPSIS
.Nm rmdir
.Nm
.Op Fl p
.Ar directory ...
.Sh DESCRIPTION

View File

@ -1,10 +1,11 @@
.Dd January 30, 2015
.Dt SLEEP 1 sbase\-VERSION
.Os
.Sh NAME
.Nm sleep
.Nd wait for a number of seconds
.Sh SYNOPSIS
.Nm sleep
.Nm
.Ar num
.Sh DESCRIPTION
.Nm

View File

@ -5,7 +5,7 @@
.Nm strings
.Nd print the strings of pritable characters in files
.Sh SYNOPSIS
.Nm strings
.Nm
.Op Ar file ...
.Sh DESCRIPTION
.Nm

35
tail.1
View File

@ -1,20 +1,23 @@
.TH TAIL 1 sbase\-VERSION
.SH NAME
tail \- display final lines of files
.SH SYNOPSIS
.B tail
.RB [ \-n
.IR lines ]
.RI [ file ]
.SH DESCRIPTION
.B tail
.Dd January 30, 2015
.Dt TAIL 1 sbase\-VERSION
.Os
.Sh NAME
.Nm tail
.Nd display final lines of files
.Sh SYNOPSIS
.Nm
.Op Fl n Ar lines
.Op Ar file
.Sh DESCRIPTION
.Nm
writes the last 10 lines of the file to stdout. If no file is given, tail reads
from stdin.
.SH OPTIONS
.TP
.BI \-n " lines"
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl n Ar lines
outputs the given number of lines. If
.I lines
.El
.Ar lines
begins with '+' it is used as an offset from the beginning of the file.
.SH SEE ALSO
.IR head (1)
.Sh SEE ALSO
.Xr head 1

3
tee.1
View File

@ -1,10 +1,11 @@
.Dd January 23, 2015
.Dt TEE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm tee
.Nd duplicate stdin
.Sh SYNOPSIS
.Nm tee
.Nm
.Op Fl ai
.Op Ar file ...
.Sh DESCRIPTION

View File

@ -1,10 +1,11 @@
.Dd January 20, 2014
.Dt TOUCH 1 sbase\-VERSION
.Os
.Sh NAME
.Nm touch
.Nd set file timestamps
.Sh SYNOPSIS
.Nm touch
.Nm
.Op Fl acm
.Op Fl t Ar stamp
.Ar file ...

3
tr.1
View File

@ -1,10 +1,11 @@
.Dd January 16, 2015
.Dt TR 1 sbase\-VERSION
.Os
.Sh NAME
.Nm tr
.Nd translate characters
.Sh SYNOPSIS
.Nm tr
.Nm
.Op Fl c | Fl C
.Op Fl sd
.Ar set1 set2

3
true.1
View File

@ -1,10 +1,11 @@
.Dd January 16, 2015
.Dt TRUE 1 sbase\-VERSION
.Os
.Sh NAME
.Nm true
.Nd return success
.Sh SYNOPSIS
.Nm true
.Nm
.Sh DESCRIPTION
.Nm
returns a status code indicating success

23
tty.1
View File

@ -1,13 +1,16 @@
.TH TTY 1 sbase\-VERSION
.SH NAME
tty \- print terminal name
.SH SYNOPSIS
.B tty
.SH DESCRIPTION
.B tty
.Dd January 30, 2015
.Dt TTY 1 sbase\-VERSION
.Os
.Sh NAME
.Nm tty
.Nd print terminal name
.Sh SYNOPSIS
.Nm
.Sh DESCRIPTION
.Nm
prints the name of the terminal open on stdin.
.P
.Pp
The status code is 0 if stdin is a terminal, and 1 if not. If an error occurred
the status code is 2.
.SH SEE ALSO
.IR ttyname (3)
.Sh SEE ALSO
.Xr ttyname 3

View File

@ -1,16 +1,17 @@
.TH UNLINK 1 sbase\-VERSION
.SH NAME
unlink \- call the unlink function
.SH SYNOPSIS
.B unlink
.RB file
.SH DESCRIPTION
.B unlink
.Dd January 30, 2015
.Dt UNLINK 1 sbase\-VERSION
.Os
.Sh NAME
.Nm unlink
.Nd call the unlink function
.Sh SYNOPSIS
.Nm
.Ar file
.Sh DESCRIPTION
.Nm
calls the
.IR unlink
.Xr unlink 2
function on
.IR file.
.SH SEE ALSO
.IR unlink (2)
.Ar file.
.Sh SEE ALSO
.Xr unlink 2

38
wc.1
View File

@ -1,25 +1,27 @@
.TH WC 1 sbase\-VERSION
.SH NAME
wc \- word count
.SH SYNOPSIS
.B wc
.RB [ \-clmw ]
.RI [ file ...]
.SH DESCRIPTION
.B wc
.Dd January 30, 2015
.Dt WC 1 sbase\-VERSION
.Os
.Sh NAME
.Nm wc
.Nd word count
.Sh SYNOPSIS
.Nm
.Op Fl clmw
.Op Ar file ...
.Sh DESCRIPTION
.Nm
.Pp
prints the number of lines, words, and bytes in each file. If any flags are
given, wc will print only the requested information. If no files are given, wc
reads stdin.
.SH OPTIONS
.TP
.B \-c
.Sh OPTIONS
.Bl -tag -width Ds
.It Fl c
print the number of bytes.
.TP
.B \-l
.It Fl l
print the number of lines.
.TP
.B \-m
.It Fl m
print the number of characters, not bytes.
.TP
.B \-w
.It Fl w
print the number of words.
.El

20
yes.1
View File

@ -1,10 +1,12 @@
.TH YES 1 sbase\-VERSION
.SH NAME
yes \- output a string repeatedly
.SH SYNOPSIS
.B yes
.RB [ string ... ]
.SH DESCRIPTION
.B yes
.Dd January 30, 2015
.Dt YES 1 sbase\-VERSION
.Os
.Sh NAME
.Nm yes
.Nd output a string repeatedly
.Sh SYNOPSIS
.Nm
.Op Ar string ...
.Sh DESCRIPTION
.Nm
will repeatedly output 'y' or the strings specified.