[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: differences/similarities between two files..



On 1 Oct 1998, Peter Makholm wrote:

> Michael Beattie <mickyb@es.co.nz> writes:
> 
> > Lets say I have two text files... Both having several quotes, one per
> > line. Each file has unique quotes, but both also have some quotes which
> > are the same. What is a method to get from these two text files, a third
> > file, which has all of the unique quotes, and only one of each of the same
> > quotes.. i.e.:
> 
> sort -u File1 File2 > File3
> 
> [-u is for uniq]
> 
> If File1 and File2 is sorted "sort -m -u File1 File2 > File3" might be
> faster.
> 
> You better read the manpage for sort. Im sitting at a HP-UX and I
> don't think it's the gnu sort we have.

Yipeee :) thanks...  just what i needed... 

Yep, you had the right options, looks like HP-UX and gnu sort are similar.
-m would have been a negligible help, the files are only 10k or so each.

Thanks again,

                       Michael Beattie (mickyb@es.co.nz)

               PGP Key available, reply with "pgpkey" as subject.
 -----------------------------------------------------------------------------
           If at first you don't succeed, you must be using Windows.
 -----------------------------------------------------------------------------
                Debian GNU/Linux....  Ooohh You are missing out!



Reply to: