Grepping a list of words

Jack L. Stone jacks at
Fri Aug 13 14:26:46 UTC 2010

At 04:01 PM 8.13.2010 +0200, Jonathan McKeown wrote:
>On Friday 13 August 2010 15:47:38 Jack L. Stone wrote:
>> The only thing it didn't do for me was the next step. My final objective
>> was to really determine the words in the "word.file" that were not in the
>> "main.file." I figured finding matches would be easy and then could then
>> run a sort|uniq comparison to determine the "new words" not yet in the
>> main.file.
>> Since I will have a need to run this check frequently, any suggestions for
>> a better approach are welcome.
>sort -u and comm(1)?
>comm will compare two sorted files and produce up to three lists: of words 
>only in file one, of words only in file 2 and of words common to both files. 
>You can suppress any or all of the output lists.


Thanks, I had forgotten about comm(1). Mehinks I am close to the solution
to the whole issue now.


Happy trails,
Jack L. Stone

System Admin

More information about the freebsd-questions mailing list