nlp how to count word in a tarfile using shell script code example Example: count occurrences of word in unix bash $ grep -o -i needs inspire.txt | wc -l