Have you ever find yourself wondering if your change had already propagated through some DNS servers? Wonder no more and find it for sure with this script! (Modify it to suit your needs).

#!/bin/bash -

# $1: domain to be checked. Example: domain.com

if [[ $# -lt 1 ]]
then
    printf "Error: No domain to be checked\n"
    exit 1
fi

declare -A DNS_SERVERS
DNS_SERVERS=(\
    ["Telefonica-Data_1"]="80.58.0.33"
    ["Telefonica-Data_2"]="80.58.32.97"\
    ["Telefonica-Espana_1"]="80.58.61.250"\
    ["Telefonica-Espana_2"]="80.58.61.254"\
    ["Acens-1"]="217.116.0.178"\
    ["Acens-2"]="217.116.0.179"\
    ["Google_1"]="8.8.8.8"\
    ["Google_2"]="8.8.4.4"\
    ["Dynect_1"]="208.78.70.29"\
    ["Dynect_2"]="204.13.250.29"\
    ["Dynect_3"]="208.78.71.29"\
    ["Dynect_4"]="204.13.251.29"\
)

# Header
printf "%-30s %-20s %-20s\n" "Server name" "Server IP" "Domain IP"
printf "%-30s %-20s %-20s\n" "-----------" "---------" "---------"

# Body
for key in ${!DNS_SERVERS[@]}
do
    value=${DNS_SERVERS[${key}]}
    ip=$(dig @$value $1 +time=1 +short)
    printf "%-30s %-20s %-20s\n" $key $value $ip
done