File processing - have to get the count of similiar types

view full story

http://www.unix.com – Input File: Code: c_id=india ---some data-- c_id=US --some data--- c_id=UK --some data-- c_id=india --some data-- c_id=india --some data-- c_id=Russia --some data-- c_id=UK --some data-- c_id=US --some data-- c_id=Africa --some data Now we need to group the same c_id's and to generate the count. For above eg: Output: Code: india=3 US=2 UK=2 Russia=1 Africa=1 PS: The c_id values changes, so grep "india" | wc -l will not work Thanks! (HowTos)