sort foo.txt | uniq #### sort -u foo.txt #### % (comm -2 -3 sorted_new.txt sorted_exclude.txt; < dict.txt) | sort -u \ > tmp % mv tmp dict.txt ####