Re: CLI Magic: For geek cred, try these one-liners
Posted by: Anonymous
[ip: 72.81.217.119]
on July 24, 2008 07:30 PM
I often use the -c option of uniq, which sort does not have. This gives a count of the uniq lines. For example, to find out who is sending me the most mail, I could run:
Re: CLI Magic: For geek cred, try these one-liners
Posted by: Anonymous [ip: 72.81.217.119] on July 24, 2008 07:30 PMcat mail_list | sort | uniq -c | sort -nr | head -n -5
63 foo1@verizon.net
24 support@fbar.com
22 bar1@comcast.net
20 foo2@verizon.net
9 abcxyz123@verizon.net
Later . . . Jim
#