Created
June 5, 2019 06:37
-
-
Save thomashartm/02bb14add810213daac43a89a05ff0fc to your computer and use it in GitHub Desktop.
Searches for an IP in archived and gzipped log files and splits by whitespace and shows the first 3 elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
zgrep -e "127.0.0.1" archive/access.log* | grep ".html" | cut -d' ' -f1,3,2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment