Created
August 29, 2011 18:49
-
-
Save DamianZaremba/1179098 to your computer and use it in GitHub Desktop.
Dig glue!
This file contains hidden or 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/bash | |
if [ -z "$1" ]; | |
then | |
echo "Usage: digglue <domain>"; | |
exit 1; | |
fi | |
domain=$1 | |
ext=$(echo "$domain" | awk -F. '{print $NF}'); | |
root=$(dig +short $ext NS | head -n1) | |
dig $domain NS @$root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment