From owner-freebsd-questions@FreeBSD.ORG Thu Sep 13 19:29:58 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 62BE716A418 for ; Thu, 13 Sep 2007 19:29:58 +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 309CA13C478 for ; Thu, 13 Sep 2007 19:29:57 +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 28F052EEF7; Thu, 13 Sep 2007 15:12:37 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 13 Sep 2007 15:12:37 -0400 X-Sasl-enc: ug0CIPxKodSAfH01JBJ4IowZo123ZN+BuEIGFZnO1/HZ 1189710781 Received: from [10.1.10.136] (n114.ewd.goldmark.org [72.64.118.114]) by mail.messagingengine.com (Postfix) with ESMTP id 1852E20468; Thu, 13 Sep 2007 15:13:01 -0400 (EDT) In-Reply-To: References: <20070913172001.GA78799@gizmo.acns.msu.edu> <20070913175510.GA78984@gizmo.acns.msu.edu> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <13D9DDEB-5AC6-4E2C-93F3-40054A97E3C9@goldmark.org> Content-Transfer-Encoding: 7bit From: Jeffrey Goldberg Date: Thu, 13 Sep 2007 14:12:34 -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 19:29:58 -0000 On Sep 13, 2007, at 1:19 PM, Kurt Buff wrote: > I think I may have a better solution. The file I'm trying to massage > has a predecessor - the non-unique lines are the result of a > concatenation of two files. > > Silly me, it's better to 'grep -v' with the one file vs. the second > rather than trying to merge, sort and further massage the result. The > fix will be to use sed against the first file to remove the ' NO', > thus providing a clean argument for grepping the other file. Instead of grep -v take a look at comm. -j