O número de palavras em input
menos o número de stopword
s (usando % de -o
do GNU grep a>, desde que você marcou o Linux):
echo $(( $(wc -w < input) - $( grep -o stopword input | wc -l ) ))
Exemplo de entrada:
I have the large set of the text file. In that, each article is separated by 15 stopwords. I want to find out the total number of words count in that file excluding the stopword.
stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword stopword
I have the large set of the text file. In that, each article is separated by 15 stopwords. I want to find out the total number of words count in that file excluding the stopword.
Saída:
$ echo $(( $(wc -w < input) - $( grep -o stopword input | wc -l ) ))
66