List currently advertised domain controllers from Linux
for word in $( dig -t srv +short _ldap._tcp.ad.example.com | awk '{print $NF}' | sort ) ; do printf "%s %s\n" "${word}" "$( dig +short ${word} )" ; done
Preserving for the future: Shell scripts, AoC, and more
for word in $( dig -t srv +short _ldap._tcp.ad.example.com | awk '{print $NF}' | sort ) ; do printf "%s %s\n" "${word}" "$( dig +short ${word} )" ; done
Comments