Skip to content

Instantly share code, notes, and snippets.

@viruthagiri
Created May 1, 2014 12:50
Show Gist options
  • Save viruthagiri/2ef6001d77b0f19bb6be to your computer and use it in GitHub Desktop.
Save viruthagiri/2ef6001d77b0f19bb6be to your computer and use it in GitHub Desktop.
import re
import sys
with open(sys.argv[1]) as f:
previous = None
for line in f:
match = re.search('^([A-Z0-9-]+) NS', line)
if match:
domain = match.group(1).lower()
if domain != previous:
print domain
previous = domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment