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.
Just for fun, here's the Powershell version:
cat filename.txt | sort length | select -last 1
And to just get the length:
(cat filename.txt | sort length | select -last 1).Length