I have log file. I want extract email list from specific lines. Sample log file:
05:06:48,311 INFO http-nio-8080-exec-81 controller.IndexController:221 - Attempt to login: [[email protected]]. Headers: ["content-length": "52", ...]
15:06:48,311 INFO http-nio-8080-exec-81 controller.IndexController:221 - Attempt to login: [[email protected]]. Headers: ["content-length": "52", ...]
09:40:21,187 INFO http-nio-8080-exec-31 security.AuthAuthenticationProvider:81 - User: [16167]. Wrong code. Telegram: [0]. Google: [0]
My script:
cat file.log | sed -r 's/.*Attempt to login: \[(.*)\]\..*/\1/' | sort | uniq > file.log.filtered.txt
I get file.log.filtered.txt:
09:40:21,187 INFO http-nio-8080-exec-31 security.AuthAuthenticationProvider:81 - User: [16167]. Wrong code. Telegram: [0]. Google: [0]
[email protected]
Why I have line with "AuthAuthenticationProvider" in filtered file?