Created
April 22, 2016 13:39
-
-
Save pawal/df9444e30eb4d10af0bd1042c0966a4f to your computer and use it in GitHub Desktop.
Get a list of delegated domains from a zone
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
#!/bin/sh | |
awk '{ | |
if (match($0,"^$")) # remove empty lines | |
skip = $1 | |
else if (match($0,"^;")) # remove comment lines | |
skip = $1 | |
else if ($1 == "se.") # remove our own zone | |
skip = $1 | |
else if ($1 == "nu.") # remove our own zone | |
skip = $1 | |
else if ($4 == "NS") # match on NS | |
print $1 | |
}'|sort -u|sed 's/.$//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment