WC(1) BSD WC(1)
NAME
wc - word count
SYNOPSIS
wc [ -lwc ] [ name ... ]
DESCRIPTION
wc counts lines, words and characters in the named files, or in the
standard input if no filename appears. A word is defined as a maximal
string of characters delimited by spaces, tabs or newlines.
If you provide more than one filename as an argument, wc performs an
individual count on each file, as well as a total count of lines, words
and characters in all the files. In any case, wc lists the specified
names along with the count.
OPTIONS
The options can be combined to select which counts will be reported.
-l Report a line count.
-w Report a word count.
-c Report a character count.
EXAMPLES
% wc namelist
61 127 853 namelist
In the previous example, the first column indicates the number of lines,
followed by the number of words, the number of characters, and finally,
the filename.
The following example shows the individual line and word count for the
files namelist and namelist.update, and the total number of lines and
words in the two files.
% wc -lw namelist namelist.update
61 127 namelist
270 447 namelist.update
331 574 total