Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NSLOOKUP Scipt - Defining DNS server

Status
Not open for further replies.

Trancemission

Technical User
Oct 16, 2001
108
GB
I am having big trouble with nslookup with what *should* be a simple script. I have a file where each line lists a domain, I then write a script that will do a nslookup on each line and pass this to another file. My problem is getting nslookup to execute. All I need from ns lookup is the NS records but I also need to define whois.co.uk as the domain server. I could change the resolve.conf file but the box is bring used as a live DNS server and I would not like to change that as this will be an on-going administrative task. I am not worried at getting just the NS record as I can manipulate that after. I am having trouble with the syntax of nslookup to define whois.co.uk as the domain server.
 
the command
[tt]
nslookup abox.microsoft.com mydns.server.com
[/tt]

will try and use mydns.server.com to do the lookup, it will revert to whatever's in resolv.conf if the query doesn't work. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top