如果我有日志文件
88.191.254.20 - - [22/Mar/2009:07:00:32 +0100] "GET / HTTP/1.0"
66.249.66.231 - - [22/Mar/2009:07:06:20 +0100] "GET /popup.php?choix=-89 HTTP/1.1"
66.249.66.231 - - [22/Mar/2009:07:11:20 +0100] "GET /specialiste.php HTTP/1.1"
83.198.250.175 - - [22/Mar/2009:07:40:06 +0100] "GET / HTTP/1.1"
83.198.250.175 - - [22/Mar/2009:07:40:06 +0100] "GET /style.css HTTP/1.1"
83.198.250.175 - - [22/Mar/2009:07:40:06 +0100] "GET /images/ht1.gif HTTP/1.1"
.....
我想要这样的结果
结果
"88.191.254.20", 1 times,
"22/Mar/2009", "07:00:32", "+0100", "GET / HTTP/1.0""66.249.66.231", 2 times,
"22/Mar/2009", "07:06:20", "+0100", "GET /popup.php?choix=-89 HTTP/1.1"
"22/Mar/2009", "07:11:20", "+0100", "GET /specialiste.php HTTP/1.1""83.198.250.175", 3 times,
"22/Mar/2009", "07:40:06", "+0100", "GET / HTTP/1.1"
"22/Mar/2009", "07:40:06", "+0100", "GET /style.css HTTP/1.1"
"22/Mar/2009", "07:40:06", "+0100", "GET /images/ht1.gif HTTP/1.1
并将结果保存在csv文件中
这里有一个方法:
相关问题 更多 >
编程相关推荐