Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 2008 04:17:28 +0100
From:      RW <fbsd06@mlists.homeunix.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to use dig with an ip list
Message-ID:  <20080819041728.0c3b7420@gumby.homeunix.com.>
In-Reply-To: <F00086DB609A849EAB40A058@Macintosh.local>
References:  <F00086DB609A849EAB40A058@Macintosh.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 18 Aug 2008 21:03:36 -0500
Paul Schmehl <pauls@utdallas.edu> 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:
> 
> x.x.x.x
> y.y.y.y
> 
> 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?

You could pipe it through:

  while read ip;do echo "${ip} `dig +short -x ${ip}`";done





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080819041728.0c3b7420>