[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Automated NSLOOKUP COMMANDFILE

Posted on 2006-03-25
1
Medium Priority
?
483 Views
Last Modified: 2008-03-06
I am currently trying to create an nslookup.cmd which will run on a number of addresses that are read from a text file.  I want it to have and output file also which logs the successful/unsuccessful nslookups.  Any ideas?  I know this can be easily done with Ping and tracert but I have been having problems with nslookup.
0
Comment
Question by:bigtazz
1 Comment
 
LVL 19

Accepted Solution

by:
Kim Ryan earned 1000 total points
ID: 16296280
nslookup is deprecated so will not be supported for ever. The recommended replacements are host and dig. A simple solution is :
create a text file, say  IPs_to_find.txt
some.domain.com
some.domain2.com
some.domain3.com

Then from command line,

dig -f IPs_to_find.txt +short >> ip_log.txt

This will append the short form output of dig to a text file  for all the lookup results  of addresses in IPs_to_find.txt.  Use dig -h to see more options.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question