Skip to content

Instantly share code, notes, and snippets.

@DamianZaremba
Created August 29, 2011 18:49
Show Gist options
  • Save DamianZaremba/1179098 to your computer and use it in GitHub Desktop.
Save DamianZaremba/1179098 to your computer and use it in GitHub Desktop.
Dig glue!
#!/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