[sf-lug] Notice: ns1.svlug.org downtime, DNS secondary
ron at ronaldbarnes.ca
Sun Nov 14 12:39:05 PST 2021
Michael Paoli wrote on 2021-11-14 7:57 a.m.:
> echo 'sf-lug.com.
> sf-lug.net.' | (
> while IFS="$IFS_" read subdomain TLD
> Authority_NS="$(dig +short "$TLD". NS | head -n 1)"
> Authority_NS_IP="$(dig +short "$Authority_NS" A "$Authority_NS"
> AAAA | head -n 1)"
> dig @"$Authority_NS_IP" +noall +authority +norecurse
> "$subdomain.$TLD." | fgrep -i svlug || echo OK
> ) | sort -u
That's some nifty bash + DNS wizardry there.
But I was really thrown by the Internal Field Separator magic - why
inside the "while" loop?
I tested it on the outside and got similar results, is it just a
And how does IFS get reset to original value (minus the ".") after the
script has run?
More information about the sf-lug