shell统计日志中ip出现次数

生产访问日志access.log格式如下:

10.202.33.61|2016-03-01 10:01:10

10.202.33.62|2016-03-01 10:01:10

10.202.33.61|2016-03-01 10:01:10

10.202.33.62|2016-03-01 10:01:10

统计每个ip出现次数

cut -d '|' -f 1 access.log |sort|uniq -c

猜你喜欢

转载自shenhaiquan.iteye.com/blog/2285211