count occurrences of word in file linux ignoring case code example Example: count occurrences of word in file linux ignoring case $ grep -o -i needs inspire.txt | wc -l