请各位大神帮帮忙~~~~
日志格式如下:
27.19.74.143 - - [30/May/2013:17:38:20 +0800] "GET /static/image/common/faq.gif HTTP/1.1" 200 1127
110.52.250.126 - - [30/May/2013:17:38:20 +0800] "GET /data/cache/style_1_widthauto.css?y7a HTTP/1.1" 200 1292
27.19.74.143 - - [30/May/2013:17:38:20 +0800] "GET /static/image/common/hot_1.gif HTTP/1.1" 200 680
需求:
时间格式统一为20150426这种
将"GET /static或是GET /source/"开头的访问记录过滤掉
GET和POST字符串也省略掉
过滤掉结尾的指定字符串:“HTTP/1.1”
输出结果如下:
117.135.212.82 20130530192838 api.php?mod=js&bid=94
59.60.121.125 20130530192838 thread-11764-1-1.html
114.249.233.29 20130530192839 api/connect/like.php