number of different lines in a file

Paddy paddy3118 at netscape.net
Fri May 19 14:38:55 EDT 2006


If the log has a lot of repeated lines in its original state then
running uniq twice, once up front to reduce what needs to be sorted,
might be quicker?

 uniq log_file | sort| uniq | wc -l 

- Pad.




More information about the Python-list mailing list