From owner-freebsd-questions@FreeBSD.ORG Mon Aug 7 19:40:21 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 1420A16A4DF for ; Mon, 7 Aug 2006 19:40:21 +0000 (UTC) (envelope-from wash@wananchi.com) Received: from ns2.wananchi.com (ns2.wananchi.com [62.8.64.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BE0F43D62 for ; Mon, 7 Aug 2006 19:40:18 +0000 (GMT) (envelope-from wash@wananchi.com) Received: from wash by ns2.wananchi.com with local (Exim 4.63 #0 (FreeBSD 4.11-STABLE)) id 1GAAxS-0009IV-Or by authid for ; Mon, 07 Aug 2006 22:40:14 +0300 Date: Mon, 7 Aug 2006 22:40:14 +0300 From: Odhiambo Washington To: freebsd-questions@freebsd.org Message-ID: <20060807194014.GC4120@ns2.wananchi.com> Mail-Followup-To: Odhiambo Washington , freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine alone!. X-Mailer: Mutt 1.5.12 (2006-07-14) X-Designation: Systems Administrator, Wananchi Online Ltd. X-Location: Nairobi, KE, East Africa. User-Agent: Mutt/1.5.12-2006-07-14 Subject: 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 19:40:21 -0000 Hi 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 .... I am thinking about using `diff` but again it doesn't look quite straight to me. How do I get the data from FileB that isn't in FileA ? There could be many possible ways but I am simply brain dead at the moment. -Wash http://www.netmeister.org/news/learn2quote.html DISCLAIMER: See http://www.wananchi.com/bms/terms.php -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ Lysistrata had a good idea.