On Linux I have two text files with russian UTF8 words sorted with sort -u
(actually I used :%sort u
in Vim, it produces same results).
One of the files dict.txt
contains around 700000 words of my custom dictionary. Another file bad-words.txt
contains often mistyped words.
I'd like to remove all words found in bad-words.txt
from dict.txt
.
I know that a perl script using a hash could do that, but I'm after a Unix one liner.
Ist there please a Unix command (maybe something using diff
?) to perform this task? And I hope diff
won't be confused by the large number of lines - because "Beyond compare" program on Windows is...