我需要在 nginx 访问日志中同时找到不同的 ip
我的日志是:
5.218.148.20 - - [28/Nov/2022:18:49:07 +0330] "GET /family HTTP/1.1" 101 8140 "-" "Go-http-client/1.1"
5.213.114.236 - - [28/Nov/2022:18:49:10 +0330] "GET /family HTTP/1.1" 101 843 "-" "Go-http-client/1.1"
5.127.44.101 - - [28/Nov/2022:18:49:18 +0330] "GET /family HTTP/1.1" 101 167 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:49:20 +0330] "GET /family HTTP/1.1" 101 382 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:49:25 +0330] "GET /family HTTP/1.1" 101 8560 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:49:34 +0330] "GET /family HTTP/1.1" 101 304 "-" "Go-http-client/1.1"
5.218.148.20 - - [28/Nov/2022:18:49:39 +0330] "GET /family HTTP/1.1" 101 6182 "-" "Go-http-client/1.1"
5.218.148.20 - - [28/Nov/2022:18:49:40 +0330] "GET /family HTTP/1.1" 101 1653 "-" "Go-http-client/1.1"
5.127.44.101 - - [28/Nov/2022:18:49:43 +0330] "GET /family HTTP/1.1" 101 609 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:49:45 +0330] "GET /family HTTP/1.1" 101 607 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:49:54 +0330] "GET /family HTTP/1.1" 101 3125 "-" "Go-http-client/1.1"
5.218.148.20 - - [28/Nov/2022:18:49:56 +0330] "GET /family HTTP/1.1" 101 6005 "-" "Go-http-client/1.1"
5.127.44.101 - - [28/Nov/2022:18:50:02 +0330] "GET /family HTTP/1.1" 101 1026 "-" "Go-http-client/1.1"
5.213.114.236 - - [28/Nov/2022:18:50:09 +0330] "GET /family HTTP/1.1" 101 607 "-" "Go-http-client/1.1"
5.213.114.236 - - [28/Nov/2022:18:50:12 +0330] "GET /family HTTP/1.1" 101 670 "-" "Go-http-client/1.1"
5.127.236.49 - - [28/Nov/2022:18:50:22 +0330] "GET /family HTTP/1.1" 101 340 "-" "Go-http-client/1.1"
5.127.236.49 - - [28/Nov/2022:18:50:28 +0330] "GET /family HTTP/1.1" 101 607 "-" "Go-http-client/1.1"
5.127.236.49 - - [28/Nov/2022:18:50:34 +0330] "GET /family HTTP/1.1" 101 1026 "-" "Go-http-client/1.1"
5.213.114.236 - - [28/Nov/2022:18:50:35 +0330] "GET /family HTTP/1.1" 101 469 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:50:37 +0330] "GET /family HTTP/1.1" 101 1026 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:50:40 +0330] "GET /family HTTP/1.1" 101 1534 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:50:47 +0330] "GET /family HTTP/1.1" 101 1019 "-" "Go-http-client/1.1"
5.127.44.101 - - [28/Nov/2022:18:50:47 +0330] "GET /family HTTP/1.1" 101 609 "-" "Go-http-client/1.1"
5.127.75.210 - - [28/Nov/2022:18:50:49 +0330] "GET /family HTTP/1.1" 101 4267 "-" "Go-http-client/1.1"
例如,我想找到这两行:
5.127.75.210 - - [28/Nov/2022:18:50:47 +0330] "GET /family HTTP/1.1" 101 1019 "-" "Go-http-client/1.1"
5.127.44.101 - - [28/Nov/2022:18:50:47 +0330] "GET /family HTTP/1.1" 101 609 "-" "Go-http-client/1.1"
如果我可以使用每 1 小时运行一次的 bash 脚本并找到所有不同的 ip,我会很高兴。多谢。