[prev] [index] [next]

wc: word counter

The wc command is a summarizing filter.

Useful with other filters to count things.

-c counts the number of characters   (incl. \n)
-w counts the number of words   (non-white space)
-l counts the number of lines

Some filters find counting so useful that they define their own options for it (e.g. grep -c)