From owner-freebsd-questions@FreeBSD.ORG Mon Aug 7 20:13:14 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 8EDC816A4E1 for ; Mon, 7 Aug 2006 20:13:14 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B39543D68 for ; Mon, 7 Aug 2006 20:13:11 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.6/8.13.6) id k77KDB5X009551; Mon, 7 Aug 2006 15:13:11 -0500 (CDT) (envelope-from dan) Date: Mon, 7 Aug 2006 15:13:11 -0500 From: Dan Nelson To: Odhiambo Washington , freebsd-questions@freebsd.org Message-ID: <20060807201311.GA69605@dan.emsphone.com> References: <20060807194014.GC4120@ns2.wananchi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060807194014.GC4120@ns2.wananchi.com> X-OS: FreeBSD 6.1-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.12-2006-07-14 Cc: Subject: Re: How to filter the contents of two text files .. 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, 07 Aug 2006 20:13:14 -0000 In the last episode (Aug 07), Odhiambo Washington said: > Some little help is needed here ... > > I have two text files, each has just a single column of data > > FileA has 2798 entries, while FileB has 4242 entries; There are > entries in FileA that are also in FileB... > > I'd like to filter against the two files, so I only get those entries > in FileB that don't occur only in FileA .... If your files are sorted, you can use the 'comm' command. -- Dan Nelson dnelson@allantgroup.com