The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: sort
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 01-27-2008
mirusnet's Avatar
mirusnet mirusnet is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 146
sort

What is the easiest way to count duplicate lines?

example:
aaa
b
b
b
b
b

Output:
aaa 1
b 5


Sorry, maybe someone already ask for it,
but I can not find.