How to use nslookup or dig to find multiple hosts (batch-type process)

Jim_4649 at yahoo.com Jim_4649 at yahoo.com
Sat Dec 24 02:28:06 UTC 2005


I'm new to this, so please help me if you can! Here's my problem: I
have a long list of fully qualified hostnames in an ASCII text file
(over 300 hostnames). I want to find the IP address of each of these
boxes. I know how to do this one record at a time using nslookup, but
that would take forever.

Can anyone tell me if there is some sort of batch file I can write, or
some sort of batch function (using nslookup, dig or whatever) that
would allow me to query the name server for all these hosts, using my
list as the input? Of course I would want to pipe the results to
another text file, but that part seems simple enough. Any help or
suggestions would be greatly appreciated! Thanks a lot. 

Jim



More information about the bind-users mailing list