Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2006 16:25:18 -0400
From:      Charles Swiger <cswiger@mac.com>
To:        Odhiambo Washington <wash@wananchi.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How to filter the contents of two text files ..
Message-ID:  <CEA88814-55BF-4302-8133-DBDABC7958CD@mac.com>
In-Reply-To: <20060807194014.GC4120@ns2.wananchi.com>
References:  <20060807194014.GC4120@ns2.wananchi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 7, 2006, at 3:40 PM, Odhiambo Washington wrote:
> 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 ....

See "man comm"; also note that you will have to sort the contents of  
files first.

-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CEA88814-55BF-4302-8133-DBDABC7958CD>