This is a discussion on Re: NSLookup Utility within the Bind Users forums, part of the DNS and Related Forums category; Barry Margolin wrote: > In article <bioep1$1h86$1@sf1.isc.org>, > Jim Easley <jeasley18@comcast....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Barry Margolin wrote:
> In article <bioep1$1h86$1@sf1.isc.org>, > Jim Easley <jeasley18@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 |