.TH wc "" "" Command
.PC "Count words, lines, and characters in text files"
\fBwc [\-clw] [\fIfile.\^.\^.\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-c\fR"
Print count of characters
.IC "\fB\-l\fR"
Print count of lines
.IC "\fB\-w\fR"
Print count of words
.Pp
If no \fIfile\fR is given, \fBwc\fR reads stdin;
if more than one \fIfile\fR is given, it also prints a total.
.HE
.B wc
counts words, lines, and characters in each
.IR file .
If no
.I file
is given,
.B wc
uses the standard input.
If more than one
.I file
is given,
.B wc
also prints a total for all of the files.
.PP
.B wc
defines a
.I word
to be a string of characters surrounded by white
space (blanks, tabs, or newlines).
It defines the number of lines to be the number of newline characters
in the file, plus one.
.PP
.B wc
recognizes the following options:
.IP \fB\-c\fR 0.3i
Count only characters.
.IP \fB\-l\fR
Count only lines.
.IP \fB\-w\fR
Count only words.
.PP
The default action is to print all counts.
.SH "See Also"
.Xr "commands" commands
