wc

From RaySoft

The program reads either standard input or a list of files and generates one or more of the following statistics: newline count, word count, and byte count. If a list of files is provided, both individual file and total statistics follow.[1]

Documentation

Syntax

wc [PARAMETER ...] [FILE ...]

Parameters

-l, --lines
Print the newline counts.
-L, --max-line-length
Print the length of the longest line.
-w, --words
Print the word counts.

Examples

Shows the longest line of a file[2]
tr '\t' ' ' <'test.txt' | wc --max-line-length

References