NSLookup Utility

Herb Martin news at LearnQuick.com
Sat Aug 30 16:13:49 UTC 2003


Even in Windows it is fairly trivial if we presume the CSV was
built to cooperate (someone below worried about weird CSV
variants--in which case I would switch to Perl.)

for /f "tokens=1 delims=, " %%a in (%1) do nslookup %%a %2 >>%~dpn1.txt 2>1

The above is written for a batch file (use single % signs as "%a"
if run interactively) -- and remove the command line paramater
support.

It expects the name of the CSV file (an extension is assumed)
and outputs to that name with .txt extension.  If you make the
"mistake" of using a file with no exentension it will append rather
than overwrite that file.

It allows an optional paramater to the batch of which DNS server to use.

Herb Martin



More information about the bind-users mailing list