From owner-freebsd-questions@FreeBSD.ORG Mon May 12 21:06:17 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 259B21065686 for ; Mon, 12 May 2008 21:06:17 +0000 (UTC) (envelope-from fbsd06+V3=62d9fb26@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id F1B1F8FC13 for ; Mon, 12 May 2008 21:06:16 +0000 (UTC) (envelope-from fbsd06+V3=62d9fb26@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id B2E0A163F5D for ; Mon, 12 May 2008 16:55:09 -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 A568B23E3E7 for ; Mon, 12 May 2008 16:55:06 -0400 (EDT) Date: Mon, 12 May 2008 21:55:03 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20080512215503.42926695@gumby.homeunix.com.> In-Reply-To: <5908E3FC770922A748B2301B@utd65257.utdallas.edu> References: <5908E3FC770922A748B2301B@utd65257.utdallas.edu> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Mon, 12 May 2008 21:06:17 -0000 On Mon, 12 May 2008 14:08:06 -0500 Paul Schmehl wrote: > --On Monday, May 12, 2008 13:59:47 -0500 Paul Schmehl > wrote: > > > > Sure, I can edit the file and prepend +short -x to each line, but > > by then I might as well just do them individually. > > > > What am I missing? > > Never mind. > > This worked. > > (read line; dig +short -x `echo $line`; while read line; do dig > +short -x `echo $line`; done) < iplist > I tend to use "xargs -n1" with dig e.g cat iplist | xargs -n1 dig +short -x