From owner-freebsd-questions Sat Feb 8 21:22:39 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37F0A37B409 for ; Sat, 8 Feb 2003 21:22:38 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8DD0D43FB1 for ; Sat, 8 Feb 2003 21:22:37 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.6/8.12.6) id h195Mbi3092483; Sat, 8 Feb 2003 23:22:37 -0600 (CST) (envelope-from dan) Date: Sat, 8 Feb 2003 23:22:36 -0600 From: Dan Nelson To: Doug Poland Cc: questions@FreeBSD.ORG Subject: Re: text processing, excluding common lines Message-ID: <20030209052236.GE5356@dan.emsphone.com> References: <20030209050856.GA55816@babylon.polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030209050856.GA55816@babylon.polands.org> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.3i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Feb 08), Doug Poland said: > Hi, > > Anyone know a command-line tool (or tools piped together) that > could achieve the following results. Given... > > % cat fileA > line1 > line2 > line3 > > % cat fileB > line2 > line4 > line5 > > % cat fileC > line1 > line4 > line6 > line7 > > I would like to see all the lines in fileC that are not in fileA or > fileB. In my case, I may be seraching against many files, i.e., > (A,B,C,etc...) > > So my desired result would be: > > line6 > line7 cat fileA fileB | sort | comm -13 - fileC -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message