compare two files

Hi all

I have seen many topics on file comparision. However, hardly any one match my problem.

I have two text files A.txt and B.txt . In each files, there are texts line by line. I want to compare these lines and print the lines to a third file which are not common in both the files. The lines may not be ended by fullstop (.) since these may be subsentences.

Any help is appreciated.

man cmp

or man comm

or man diff

/usr/xpg4/bin/grep -v -f A.txt B.txt > C.txt
Source in russian

I know a nice tool : diff3
It has more feature than diff and could help you.

Hi.

This is a useful utility compared to comm because there is no requirement for sorting.

The elimination of lines ending in full-stop may be done after the combine or as a preliminary step, say with a sed command like:

sed '/\.$/d'

cheers, drl