On Thu, 31 Aug 2000, Eric Sisler wrote:
> Ok, stupid question of the day.
>
> I'm trying to find & print (dump to a file) the longest line in a text
> file. I've been able to determine the *length* of the longest line by
> using the 'wc -L' command, but is there any way using find or some other
> command to *output* the longest line?
ah, way too easy.
maxlen=$(wc -L filename)
grep "^.\{$maxlen\}$" filename
note that this prints *all* lines of the max length.
rday
--
"This is Microsoft technical support. How may I misinform you?"
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list