sort and count-unique in the same file?

From: sun@bagdon.com
Date: Fri Sep 27 2002 - 17:15:14 EDT


We're trying to do a simple sort and count, using shell. We need to grep
out a string, of which there may be 15 unique entries for 1000 total
entries - but we then want to count how many individual entries there are
for each unique entrie.

Unique is easy - "sort -u". But we'd like to know that there's (for
example) 100 of the first entry, 50 of the second entry, etc. We can
accomplish this via perl, but a few-line shell script would make a life a
lot easier.

If anyone has any input, it would be greatly welcome.

Thanks!

Steve B.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:00 EDT