I want to remove negative words form sentence using bash script .
The negative words that i meant it :
[dull,boring,annoying,bad]
My file text text.txt contains this sentence :
These dull boring cards are part of a chaotic board game ,and bad for people
I'm using this script
array=( dull boring annoying bad )
for i in "${array[@]}"
do
cat $p | sed -e 's/\<$i\>//g'
done < my_text.txt
But I got the following wrong result:
These boring cards are part of a chaotic board game ,and bad for people
The correct output must be like this :
These cards are part of a chaotic board game ,and for people