Sed in place edit

Viewed 22262
for term in `cat stopwords`; do sed -i 's/\<$term\>//g' spam.txt ;done

Given stopwords contains a word per line and spam.txt is plain text file, I just need to replace exact matches of stopwords. Does not behave as I expect ... Note there are words like doesn't, couldn't in both the files.

4 Answers
Related