Created
March 28, 2016 18:17
-
-
Save markjenkins/673822cb2b0272ddf3a5 to your computer and use it in GitHub Desktop.
This file contains 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
from sys import argv | |
# tab separated input from processing apache logs with awk to just have relevant fields and tab separation | |
ips = set() | |
with file(argv[1]) as f: | |
for line in f: | |
ip, date, url = line.split('\t') | |
if ip not in ips: | |
print "%s\t%s" % (ip, date) | |
ips.add(ip) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment