<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 11, 2014 at 9:13 PM, Mark Andrews <span dir="ltr"><<a href="mailto:marka@isc.org" target="_blank">marka@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><br>
</span>The following will work for any zone w/o a embedded period in a label.<br>
<br>
zone="$1" parent="$1" ns=<br>
while test -z "$ns" -a -n "$parent"<br>
do<br>
parent=`expr "X$zone" : '^[^.]*.\(.*\)'`<br>
ns=`dig +short ns -q "$parent"`<br>
done<br>
(<br>
for s in $ns<br>
do<br>
dig +noall -q "$zone" soa "@$s" +authority<br>
done<br>
) | awk '{print $5}' | sort -ui<br></blockquote><div><div>Mark,<br><br>Thanks for helping out a guy like me learn how to be more useful
with bash. I am using this plus my own changes to do
testing of a hosting environment here today.<br><br></div>Thanks for sharing this code.<br><br>Cheers,<br></div><div>Jonathan<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="im"><br>
> --<br>
> Mark E. Jeftovic <<a href="mailto:markjr@easydns.com">markjr@easydns.com</a>><br>
> Founder & CEO, easyDNS Technologies Inc.<br>
> <a href="tel:%2B1-%28416%29-535-8672%20ext%20225" value="+14165358672">+1-(416)-535-8672 ext 225</a><br>
> Read my blog: <a href="http://markable.com" target="_blank">http://markable.com</a><br>
><br>
> _______________________________________________<br>
> dns-operations mailing list<br>
> <a href="mailto:dns-operations@lists.dns-oarc.net">dns-operations@lists.dns-oarc.net</a><br>
> <a href="https://lists.dns-oarc.net/mailman/listinfo/dns-operations" target="_blank">https://lists.dns-oarc.net/mailman/listinfo/dns-operations</a><br>
> dns-jobs mailing list<br>
> <a href="https://lists.dns-oarc.net/mailman/listinfo/dns-jobs" target="_blank">https://lists.dns-oarc.net/mailman/listinfo/dns-jobs</a><br>
</span><span class=""><font color="#888888">--<br>
Mark Andrews, ISC<br>
1 Seymour St., Dundas Valley, NSW 2117, Australia<br>
PHONE: <a href="tel:%2B61%202%209871%204742" value="+61298714742">+61 2 9871 4742</a> INTERNET: <a href="mailto:marka@isc.org">marka@isc.org</a><br>
</font></span><div class=""><div class="h5">_______________________________________________<br>
dns-operations mailing list<br>
<a href="mailto:dns-operations@lists.dns-oarc.net">dns-operations@lists.dns-oarc.net</a><br>
<a href="https://lists.dns-oarc.net/mailman/listinfo/dns-operations
dns-jobs" target="_blank">https://lists.dns-oarc.net/mailman/listinfo/dns-operations<br>
dns-jobs</a> mailing list<br>
<a href="https://lists.dns-oarc.net/mailman/listinfo/dns-jobs" target="_blank">https://lists.dns-oarc.net/mailman/listinfo/dns-jobs</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br> Jonathan
</div></div>