- 论坛徽章:
- 7
|
本帖最后由 tuyajie 于 2015-07-27 11:35 编辑
你这是要考试么~~~ - awk 'BEGIN{FPAT="(\"[^\"]+\")|([^ ]+)"} {print $4,$5,$6}' YourFile
- [23/Jul/2015:04:53:39 +0800] "GET /Activity/hall_three_meals HTTP/1.1"
- [23/Jul/2015:04:53:40 +0800] "GET /Activity/hall_three_meals HTTP/1.1"
- [23/Jul/2015:04:53:40 +0800] "GET /?bd_wm_xxxxx HTTP/1.1"
- [23/Jul/2015:04:53:41 +0800] "GET /Goods/591 HTTP/1.1"
- [21/Jul/2015:03:16:03 +0800] "GET /index/ HTTP/1.1"
- [21/Jul/2015:03:16:04 +0800] "GET /Store/003 HTTP/1.1"
- [21/Jul/2015:03:16:04 +0800] "GET / HTTP/1.1"
- [21/Jul/2015:03:16:06 +0800] "GET /Store/042id=1 HTTP/1.1"
- [21/Jul/2015:03:16:06 +0800] "GET /ErrorPage/index HTTP/1.1"
- [21/Jul/2015:03:16:07 +0800] "GET / HTTP/1.1"
- [21/Jul/2015:03:16:08 +0800] "GET /Activity/hall_three_meals HTTP/1.1"
- [21/Jul/2015:03:16:03 +0800] "GET /index/ HTTP/1.1"
- [21/Jul/2015:03:16:04 +0800] "GET /Store/003 HTTP/1.1"
- [21/Jul/2015:03:16:04 +0800] "GET / HTTP/1.1"
- [21/Jul/2015:03:16:06 +0800] "GET /Store/042id=1 HTTP/1.1"
- [21/Jul/2015:03:16:06 +0800] "GET /ErrorPage/index HTTP/1.1"
- [21/Jul/2015:03:16:07 +0800] "GET / HTTP/1.1"
- [21/Jul/2015:03:16:08 +0800] "GET /Activity/hall_three_meals HTTP/1.1"
复制代码 然后在这个基础上就是写你要的函数了。。。 |
|