How to filter the contents of two text files ..

Charles Swiger cswiger at mac.com
Mon Aug 7 20:26:08 UTC 2006


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



More information about the freebsd-questions mailing list