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.
In perl:
perl -ne 'print ($l = $_) if (length > length($l));' filename | tail -1
this only prints the line, not its length too.