How to use dig with an ip list
jeffrey at goldmark.org
Tue Aug 19 03:30:57 UTC 2008
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
Better might be to use something in p5-net-DNS so that you don't make
N separate calls to dig.
Jeffrey Goldberg http://www.goldmark.org/jeff/
More information about the freebsd-questions