python - How to output difference between two text files? -
i'm wondering how can compare 2 text files, highlighting difference between each of them? example:
file1.txt
aaaaa bbbbb ccccc
file2.txt
aaaaa bbbbb
i'd have following output after comparison of 2 files:
ccccc
i'm using python, , tried sed , grep no luck (i'm interested in linux shell ways of doing too).
sort file1.txt file2.txt | uniq -u
Comments
Post a Comment