42 lines
1.3 KiB
Groff
42 lines
1.3 KiB
Groff
.TH WC 1
|
|
.SH NAME
|
|
wc \- print the number of bytes, words, and lines in files
|
|
.SH SYNOPSIS
|
|
.B wc
|
|
[\-clw] [\-\-bytes] [\-\-chars] [\-\-lines] [\-\-words] [file...]
|
|
.SH DESCRIPTION
|
|
This manual page
|
|
documents the GNU version of
|
|
.BR wc .
|
|
.B wc
|
|
counts the number of bytes, whitespace-separated words, and newlines
|
|
in each given file, or the standard input if none are given or when a
|
|
file named `\-' is given. It prints one line of counts for each file,
|
|
and if the file was given as an argument, it prints the filename
|
|
following the counts. If more than one filename is given,
|
|
.B wc
|
|
prints a final line containing the cumulative counts, with the
|
|
filename `total'. The counts are printed in the order: lines, words,
|
|
bytes.
|
|
.PP
|
|
By default,
|
|
.B wc
|
|
prints all three counts. Options can specify that only certain counts
|
|
be printed. Options do not undo others previously given, so
|
|
.BI wc " \-\-bytes \-\-words"
|
|
prints both the byte counts and the word counts.
|
|
.SS OPTIONS
|
|
.TP
|
|
.I "\-c, \-\-bytes, \-\-chars"
|
|
Print only the byte counts.
|
|
.TP
|
|
.I "\-w, \-\-words"
|
|
Print only the word counts.
|
|
.TP
|
|
.I "\-l, \-\-lines"
|
|
Print only the newline counts.
|
|
.PP
|
|
The long-named options can be introduced with `+' as well as `\-\-',
|
|
for compatibility with previous releases. Eventually support for `+'
|
|
will be removed, because it is incompatible with the POSIX.2 standard.
|