您的位置:首页 > 大数据 > 人工智能

E-mail letter to ranking statistics

2011-09-01 15:39 211 查看
As the demand for statistics about the number of the sender of the message, the following is my method:

cat /var/log/maillog | egrep 'Sep  1.*Passed'| awk '{print $11,$13}' |awk -F "," '{print $1,NF}' | awk '{print $1,$3}'| sort -n |awk '{a[$1]=$1;if($1==a[$1])b[$1]=b[$1]+$2}END{for(i in b)print b[i],a[i]}' |sort -rn |more

The results:

6413 wdradio@xxx
4216 service@xxx
3144 dt_job@xxx
2647 gongqiao@xxx
2325 dtzhaopin@xxx
2265 mhss_tousu@xxx
2235 wangyanan@xxx
2233 dmx_service@xxx
2183 dmx_tousu@xxx
2067 chuangshi@xxx
2000 linshaozhu@xxx
1832 liurui@xxx
1635 zhangqianqian@xxx
1466 kxzd1@xxx
1276 kxzd2@xxx


本文出自 “飞奔的蜗牛” 博客,请务必保留此出处http://zhangbo.blog.51cto.com/350645/655666
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: