SUMMARY: counting common lines from file

From: <sun_at_bagdon.com>
Date: Fri Oct 04 2002 - 20:11:40 EDT
Per our request to identify total count of a common line in a file. Got
lots of answer, too many to list (sorry...). But I did keep the notes on
each first successful answer:

Fabrice Guerini
$sort {file} | unix -c

Darren Dunham
$perl -lne '$l{$_}++; END{while(($l,$n)=each(%l)){print "$n\t$l";}}'
filename

Thanks to everyone, not just the answer, but all the insights.

Thanks!

Steve B.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Oct 4 21:24:45 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:55 EST