From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 20:10:10 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA76E16A476 for ; Thu, 13 Sep 2007 20:10:10 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 8E21B13C461 for ; Thu, 13 Sep 2007 20:10:10 +0000 (UTC) (envelope-from jeffrey@goldmark.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 273CB2E208; Thu, 13 Sep 2007 16:10:10 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 13 Sep 2007 16:10:10 -0400 X-Sasl-enc: Z2AMF/vCq/AmVOap5pxD0Oyidzyg9NQ5YEaD1T96uNKW 1189714234 Received: from [10.1.10.136] (n114.ewd.goldmark.org [72.64.118.114]) by mail.messagingengine.com (Postfix) with ESMTP id 5C0B220468; Thu, 13 Sep 2007 16:10:34 -0400 (EDT) In-Reply-To: References: <20070913172001.GA78799@gizmo.acns.msu.edu> <20070913175510.GA78984@gizmo.acns.msu.edu> <13D9DDEB-5AC6-4E2C-93F3-40054A97E3C9@goldmark.org> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7DA08899-AE85-4F6E-84FA-CD217881635E@goldmark.org> Content-Transfer-Encoding: 7bit From: Jeffrey Goldberg Date: Thu, 13 Sep 2007 15:10:07 -0500 To: Kurt Buff X-Mailer: Apple Mail (2.752.2) Cc: questions@freebsd.org Subject: Re: Scripting question 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: Thu, 13 Sep 2007 20:10:11 -0000 On Sep 13, 2007, at 2:38 PM, Kurt Buff wrote: >> Instead of grep -v take a look at comm. > Interesting! I just looked at the man page, and while I don't think it > it's going to be directly useful (or I'm just not reading the page > correctly), it's a new utility to me - I'll keep it in mind for other > things. Maybe I haven't understood what you are after. If you want to get lines that exist in either file1 or file2 but not both (and if the files are already sorted) then comm -3 file1 file2 will do that. -j -- Jeffrey Goldberg http://www.goldmark.org/jeff/