Andrew Prock Andrew Prock - 1 year ago 90
Bash Question

Longest line in a file

I'm looking for a simple way to find the length of the longest line in a file. Ideally, it would be a simple bash shell command instead of a script.

Answer Source

Using wc (GNU coreutils) 7.4:

wc -L filename


101 filename