Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get a list of delegated domains from a zone
#!/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
You can’t perform that action at this time.