I was using this script to regression test some DNS servers with multiple personalities. All domains are tested on all servers - both private and public.
#!/bin/bash namecheck() { echo `date`" checking for $1 @$2" ans=`dig $1 A @$2 +recurse +qr +all 2>&1` res=`echo -e "$ans" | grep "ANSWER SECTION"` if [ -z "$res" ]; then echo -e "NO ANSWER FROM $2:\n$ans" fi # echo -e "$ans" | grep -A 1 "ANSWER SECTION" } multicheck() { domains="$1" servers="$2" for domain in $domains; do for server in $servers; do namecheck $domain $server done done } pubdomains="www.tricon.hu www.sztaki.hu www.index.hu www.origo.hu www.google.co.hu www.slashdot.com www.eastsideboxing.com" pubservers="193.225.86.1 195.70.57.4 195.111.2.2 195.70.56.227 193.225.12.58" privdomains="kozteka.itak.sztaki.hu stork.oplab.sztaki.hu ilias.ilab.sztaki.hu nat.sztaki.hu ismeretlen.ilab.sztaki.hu" privservers="195.70.57.4 195.111.2.2" multicheck "$pubdomains" "$pubservers" multicheck "$privdomains" "$privservers"