Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment