From owner-freebsd-questions@FreeBSD.ORG Tue May 13 15:05:16 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 6D31C106566C for ; Tue, 13 May 2008 15:05:16 +0000 (UTC) (envelope-from erik@cepheid.org) Received: from mail.cepheid.org (aleph.cepheid.org [72.232.60.94]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA1A8FC0C for ; Tue, 13 May 2008 15:05:16 +0000 (UTC) (envelope-from erik@cepheid.org) Received: by mail.cepheid.org (Postfix, from userid 1006) id AE76C9B4006; Tue, 13 May 2008 10:05:15 -0500 (CDT) Date: Tue, 13 May 2008 10:05:15 -0500 From: Erik Osterholm To: Johan Dowdy Message-ID: <20080513150515.GA71979@aleph.cepheid.org> Mail-Followup-To: Erik Osterholm , Johan Dowdy , FreeBSD Questions References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Questions Subject: Re: Unexepcted behavior from read and cat 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, 13 May 2008 15:05:16 -0000 On Mon, May 12, 2008 at 12:22:48PM -0700, Johan Dowdy wrote: > For loops are your friend. > > I'd do something like: > > for i in `cat iplist` > do dig +short -x $I > done Even better: while read i do dig +short -x $i done < iplist See the Useless Use of Cat Award for more details. Erik