How can I remove the stop words from sentence using shell script?
问题 I'm trying to remove stop words from sentences in file? Stop Word which I mean : [I, a, an, as, at, the, by, in, for, of, on, that] I have these sentences in file my_text.txt : One of the primary goals in the design of the Unix system was to create an environment that promoted efficient program Then I want to remove stop word form the sentence above I used this script : array=( I a an as at the by in for of on that ) for i in "${array[@]}" do cat $p | sed -e 's/\<$i\>//g' done < my_text.txt