wc(1)

NAME
wc - count bytes, runes, words, and lines

SYNOPSIS
wc [-v] [-lwrbc] [--] [file ... ]

wc counts bytes, runes, words, and lines in its input files and writes the result to the standard output.

OPTIONS

-v  The -v option instructs wc to print its version number and exit.

-l  The -l option instructs wc to print the number of lines.

-w  The -w option instructs wc to print the number of words.

-r  The -r option instructs wc to print the number of runes (good and bad UTF sequences).

-b  The -b option instructs wc to print the number of bad UTF sequences.

-c  The -c option instructs wc to print the number of characters.

--  The -- (double dash) option indicates the end of options.

DESCRIPTION
wc reads each file in turn and counts the number of lines, words, runes, bad UTF sequences, and bytes. If no files are specified or a file is - (dash), wc reads from the standard input.

For each file, the requested counts are printed on a single line in the order: lines, words, runes, bad UTF sequences, and bytes. If the file is not the standard input, its name is also printed.

If more than one file is specified, a line giving the total counts is printed.

If none of the -lwrbc options are specified, wc behaves as if -lwc had been specified.

EXAMPLES
Count the number of lines in /etc/passwd: wc -l /etc/passwd

SEE ALSO
utf(4)

BUGS
None known.

SOURCES
http://pobox.com/~Alan.Watson/software.html

AUTHOR
Alan Watson (Alan.Watson@pobox.com).