Re: subtotalling identical records



Ed Morton wrote:
tony wrote:

I have a file of non-unique names.

allen
allen
allen
bob
bob

What I want is
allen 3
bob 2

Any one-liners to do this?

thanks

uniq -c file

Ed.

You might really need,

sort < file | uniq -c

--
Regards,

---Robert
.



Relevant Pages

  • Narrative magic items
    ... These are items that don't have clearly defined powers in terms of game ... mechanics. ... but in a slightly overbearing sort of way... ... standing next to Bob. ...
    (rec.games.frp.dnd)
  • Ayad Feyd al-Jabbar will drill you!
    ... cognitive polices wind Linda, and they already regulate Norris too. ... Well, I'll decorate the funding. ... Alexis never cheers until Bob markets the associated ... sort of dangerous, due operas. ...
    (sci.crypt)
  • Re: Sorting within a form
    ... Bob, I used your solution on NKTower's simple form and it works perfectly. ... So now I know how to sort with a button and I'm pretty sure I can figure out ... VBA code editor. ... VBA editor, ...
    (microsoft.public.access.forms)
  • Re: Average Question
    ... If they sort to the top, it'll be easy to delete them. ... 1/9/09 Bob Alaska $14 ... 1/10/09 Bob Seattle $44 ...
    (microsoft.public.excel)
  • Re: whats the best way
    ... Bob. ... > I concur with KJ the Dataview is the way to go. ... > 'sorting code to use headers to sort data. ... > Private Sub ReportDataGrid_SortCommand(ByVal source As System.Object, ...
    (microsoft.public.dotnet.framework.aspnet)