From owner-freebsd-questions@FreeBSD.ORG Tue May 13 18:55:53 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 462E01065670 for ; Tue, 13 May 2008 18:55:53 +0000 (UTC) (envelope-from jdowdy@ncircle.com) Received: from mail.ncircle.com (mail.ncircle.com [64.84.9.150]) by mx1.freebsd.org (Postfix) with ESMTP id 2D4898FC2D for ; Tue, 13 May 2008 18:55:52 +0000 (UTC) (envelope-from jdowdy@ncircle.com) Received: from CORP-MAIL.ad.ncircle.com (corpmail-01.ncircle.com [192.168.75.90]) by mail.ncircle.com (8.14.2/8.14.2) with ESMTP id m4DItl0e008326 for ; Tue, 13 May 2008 11:55:47 -0700 (PDT) (envelope-from jdowdy@ncircle.com) Received: from 192.168.40.173 ([192.168.40.173]) by CORP-MAIL.ad.ncircle.com ([192.168.75.94]) with Microsoft Exchange Server HTTP-DAV ; Tue, 13 May 2008 18:55:46 +0000 User-Agent: Microsoft-Entourage/11.4.0.080122 Date: Tue, 13 May 2008 11:55:46 -0700 From: Johan Dowdy To: RW , Message-ID: Thread-Topic: Unexepcted behavior from read and cat Thread-Index: Aci1KvOVMgpQOyEeEd2/8gAKla5AwA== In-Reply-To: <20080512215503.42926695@gumby.homeunix.com.> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Score: -3.894 () ALL_TRUSTED,AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 64.84.9.150 Cc: 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 18:55:53 -0000 I think this one wins for brevity. On 5/12/08 1:55 PM, "RW" wrote: > 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Johan Dowdy - CISSP Senior Systems Administrator nCircle Network Security 415.318.2880 "Any sufficiently advanced technology is indistinguishable from magic." -- Arthur C. Clarke