buster2007
asked on
How do I search, sort & count log file content?
Hi,
I have email log files, which I would like to be able to extract multiple email address in a given column ( awk '{print $12}' ) & a count of the total number of occurrences for each. Essentially a top ten (or top 100) list. Any advice would be great.
Thanks.
I have email log files, which I would like to be able to extract multiple email address in a given column ( awk '{print $12}' ) & a count of the total number of occurrences for each. Essentially a top ten (or top 100) list. Any advice would be great.
Thanks.
ASKER
That's exactly what I was looking for, perfect, thank you very much!
... and to have only a 'top ten' list, use
awk '{print $12}' file | sort | uniq -c | head -10
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
awk '{print $12}' file | sort | uniq -c