|
<- Previous Message | Next Message -> Thread Index [isp-dns] Re: script to list nameservers
On Tue, Jun 01, 2004 at 11:57:11AM -0400, Andrew P. Kaplan wrote: > Does anyone have a script that I can run against my 1000 domains on my > master server that would list domain name and authorative name servers. My > slave servers is going off line soon and I have been moving the nameserver, > but use a range of registrars with some being out of my control so I need a > list of domains that still have the old nameservers. > > Thank you. > > Andrew P. Kaplan > www.cshore.com Hi Andrew, Yes, you can use dig. e.g. dig zill.net | grep NS | grep -v ";;" gives: zill.net. 255324 NS ns3.zill.net. zill.net. 255324 NS ns1.zill.net. zill.net. 255324 NS ns2.zill.net. Explanation: dig ns example.com gives you a lot of information, so you use grep to only find the NS (nameserver) lines. There are comments that start with ";;" so you pipe it to grep again to tell it to ignore those comments. If you want to get fancier, just add more grep or grep -v commands. For instance, if you want to ignore those cases where the proper DNS is listed, add "grep -v mydns" where mydns is your nameserver. Cordially -- +--------------------------------------------------+ | Patrick Giagnocavo, patrick@... | | Zill.Net - OpenACS, Postgres, Web hosting | | OpenACS v4 shared server $49.95/month | | Colocation w/50GB transfer $79.00/month | | Managed servers (incl. system) $225/month | +--------------------------------------------------+ To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.
Thread Index |