Using a dictionary file with sed
- by Winston
I have a blacklist.txt file that contains keywords I want to remove using sed.
Here's what the blacklist.txt file contain
winston@linux ] $ cat blacklist.txt
obscure
keywords
here
...
And here's what I have so far, but currently doesn't work.
blacklist=$(cat blacklist.txt);
output="filtered_file.txt"
for i in $blacklist;
do
cat $input | sed 's/$i//g' >> $output
done