文本过滤
时间:2011-02-23
来源:互联网
- Feb 23 00:00:20 spam-gateway postfix/cleanup[22162]: 2796A51C952: hold: header Received: from mta.neco.com (unknown [212.167.24.29])??by out.mta.neco.com (Postfix) with ESMTP id 2796A51C952;??Wed, 23 Feb 2011 00:00:20 +0800 (HKT) from unknown[212.167.24.29]; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mta.neco.com>
- Feb 23 00:00:22 spam-gateway postfix/cleanup[22162]: 9797951C952: hold: header Received: from mta.neco.com (unknown [212.167.24.29])??by out.mta.neco.com (Postfix) with ESMTP id 9797951C952??for <[email protected]>; Wed, 23 Feb 2011 00:00:22 +0800 (HKT) from unknown[212.167.24.29]; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mta.neco.com>
- Feb 23 00:00:27 spam-gateway postfix/cleanup[22162]: 0EEF351C952: hold: header Received: from mta.neco.com (unknown [212.167.24.29])??by out.mta.neco.com (Postfix) with ESMTP id 0EEF351C952??for <[email protected]>; Wed, 23 Feb 2011 00:00:27 +0800 (HK from unknown[212.167.24.29]; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mta.neco.com>
作者: netocool 发布时间: 2011-02-23
awk '{print $2}' RS="from=<|to=<" FS="@|>"
luto.com.cn
luto.com.cn
googlegroups.com
gotu.com
ccitane.com
longtim.com
作者: yinyuemi 发布时间: 2011-02-23
luto.com.cn-->luto.com.cn
googlegroups.com-->gotu.com
ccitane.com-->longtim.com
作者: 99超人 发布时间: 2011-02-23
作者: ziyunfei 发布时间: 2011-02-23
作者: ziyunfei 发布时间: 2011-02-23
作者: netocool 发布时间: 2011-02-23
ziyunfei 发表于 2011-02-23 10:40
请问如何统计出前10最多的from和前10最多的to的域名,并且计算出数量呢?
作者: netocool 发布时间: 2011-02-23
回复 netocool
- awk 'NR!=1&&NR%2{to[$2]++}(NR-1)%2{from[$2]++} END{for(i in from) {print "form",from[i],i|"sort -k2nr|head -10"} for(j in to) {print "to",to[j],j|"sort -nr |head -10"}}' RS="from=<|to=<" FS="@|>"
作者: yinyuemi 发布时间: 2011-02-23
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28