How to give all words from one file to tr
for searching and deleting in text from another file?
For example, I have a file vocabulary.txt
and loveStroty.txt
. I'm trying to delete all words that in are vocabulary from love Story.
$ voc="one free" #files look like this strings
$ love="one two free four"
$ tr "$voc" '' <<< $love
Example for output (doesn't matter if it is with separators or with new line separated):
two
four