From owner-freebsd-questions@FreeBSD.ORG Tue Aug 19 03:33:51 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4EE81065674 for ; Tue, 19 Aug 2008 03:33:51 +0000 (UTC) (envelope-from fbsd06+Y6=3779b762@mlists.homeunix.com) Received: from fallback-in1.mxes.net (fallback-out1.mxes.net [216.86.168.190]) by mx1.freebsd.org (Postfix) with ESMTP id A18198FC19 for ; Tue, 19 Aug 2008 03:33:51 +0000 (UTC) (envelope-from fbsd06+Y6=3779b762@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by fallback-in1.mxes.net (Postfix) with ESMTP id CFCAD164689 for ; Mon, 18 Aug 2008 23:17:32 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id BC5FC23E4A2 for ; Mon, 18 Aug 2008 23:17:30 -0400 (EDT) Date: Tue, 19 Aug 2008 04:17:28 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080819041728.0c3b7420@gumby.homeunix.com.> In-Reply-To: References: X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: How to use dig with an ip list X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2008 03:33:51 -0000 On Mon, 18 Aug 2008 21:03:36 -0500 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: > > 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