find instances of word in linux file code example
Example 1: count occurrences of word in unix bash
$ grep -o -i needs inspire.txt | wc -l
Example 2: how to search keyword in linux
grep -w phoenix *
$ grep -o -i needs inspire.txt | wc -l
grep -w phoenix *