In this article let’s discuss about How to find number of occurances of a string in a file shell. Let’s go through the following methods without any delay.
$ grep -o -i needs inspire.txt | wc -l
Hope the above solution works.
Realted Posts : Count occurrences of word in file linux ignoring case