i need an app which can compare 2 files.

say i have tewo text files; file 1 and file 2

file 1 is the main file and file 2 is a file which i add lines into. so if i load file 1 in text box 1 and then load file 2 in text box 2 and then i would like to click compare and would like it to not do anything to the data in file 1 nor the text box 1 but to compare the lines in text box 2 with text box 1 and remove any duplicates.


file 1
a 1
ab 2
abc abc
abcd 12345
abcde
abcdef


file 2

ab 2
asd
wer
abcd 12345
abc abc
ab 2

after clicking remove duplicated i would like it to that the results from text box 2 if duplicates are removed from text box 2 not 1

text box 2 final
asd
wer


can any one help?