Last active
March 1, 2016 15:16
-
-
Save pawal/c0f50937063fbe44b454 to your computer and use it in GitHub Desktop.
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/bash | |
# The file is a newline separated list of domains | |
# Output is the same list, but with all name servers listed | |
filename="$1" | |
while read -r line | |
do | |
name="$line" | |
echo -n "$name:" | |
output=$(dig +short ns $name) | |
for x in $output; do echo -n " $x"; done; | |
echo | |
done < "$filename" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment