wc's Lesser Known -L Option
wc
is well known for giving you word, line and character counts of a file or standard input.
Today I Learned wc
can also tell you the length of the longest line in a file with the -L
flag!
$ cat file.txt
one
two
three
$ wc -L file.txt
5 file.txt
Man pages are full of useful information and trivia. Did you know wc
has been around since Unix Version 1?