--On August 18, 2008 10:13:54 PM -0500 Jeffrey Goldberg <[EMAIL PROTECTED]> wrote:

On Aug 18, 2008, at 9:03 PM, Paul Schmehl wrote:

I know I'm missing the obvious.  I want to use an IP list to
generate an ip+hostname list.  IOW, I want to go from this:


to this;

x.x.x.x foo.domain.tld
y.y..y.y bar.domain.tld

What's the best/easiest way to do this?


$ for i in `cat ip-list`; do
 > echo -n "$i "
 > dig +short -x $i
 > done

Don't know why I didn't think of that.

I ended up using this:
for ip in `cat public_linux_ips`; do echo ${ip} `dig +short -x ${ip}`; done > public_linux_ips_resolved

Which gave me the output I wanted.  Thanks for the pointer.

Paul Schmehl ([EMAIL PROTECTED])
Senior Information Security Analyst
The University of Texas at Dallas

Reply via email to