Find A, NS, and MX Records for a List of Domains
Change “domains.txt” to your file.
cat domains.txt | while read in; do echo ""; echo "$in"; echo "---------------"; dig -t ns "$in" @ns +short; dig -t mx "$in" @ns +short; dig -t soa "$in" @ns +short; done