/ Published in: Bash
Sample log line:
[INFO] 2009-03-06 20:47:35 | controller::bla | user: vincentvega | ip: 127.0.0.1
[INFO] 2009-03-06 20:47:35 | controller::bla | user: vincentvega | ip: 127.0.0.1
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
cat xyz.log | grep "2009-03" | ruby -ne 'puts $1 if $_ =~ /user:\s(\w+)/' | sort -u | wc -l