How to ignore relative few occurrences of a field value?

view full story

http://www.unix.com – Hi experts, I have a very long file that looks about like this. Code: aaad_1577 64000 aaad_1577 72000 aaad_1577 72000 aaad_1577 65000 aaad_1577 65000 (...aaad about a thousand times...) bbbd_2002 56000 bbbd_2002 57000 bbbd_3045 57000 cccd_3452 150000 dddd_6014 150000 dddd_6014 150000 dddd_6014 150000 (...dddd about a thousand times...) I want to ignore the rows where the first column values occur fewer than handful of times, say 5 times. It would be helpful if I could see how many occurrences I'm getting before I ignore them so I can go from this: Code: aaad_1577 64000 1005 aaad (HowTos)