NSLookup Utility
Kevin Darcy
kcd at daimlerchrysler.com
Fri Aug 29 22:05:47 UTC 2003
Barry Margolin wrote:
> In article <bioep1$1h86$1 at sf1.isc.org>,
> Jim Easley <jeasley18 at comcast.net> wrote:
> >Hey,
> >
> >I have an off the wall question. Is there a utility out there that
> >will allow me to import a .csv of IP addresses, then perform an
> >nslookup of each one?
> >
> >I have been assigned the task of doing this for 10,770 IP addresses
> >for a client.
>
> It seems like a trivial shell script:
>
> tr , '\n' file.csv | while read address
> do
> nslookup $address
> done
It might not be as trivial as it may seem. I seem to recall from the
_Mastering_Regular_Expressions_ O'Reilly book that there are a maddening variety
of CSV variants, particularly with regard to how they handle embedded commas
within quoted text, etc. (this was, of course, in the context of trying to extract
data from the CSV output using regular expressions).
As long as the eccentricities of the particular flavor of CSV are know, however,
it should be a fairly trivial task...
- Kevin
More information about the bind-users
mailing list