program to count the number of occurrences of a case sensitive word in a string in UNIX code example
Example: program to count the number of occurrences of a case sensitive word in a string in UNIX
$ grep -o "pattern" file_name | wc -l
$ grep -o "pattern" file_name | wc -l