title: In bash script, for a string of characters (English word), how do count the number of occurrences of that word in an external text file?
body: <p>For example: Suppose the keyword is "apple" and the text file you're searching through for the word "apple" is called fruits.txt. </p>
  
  <p>Now, suppose fruits.txt is a text file that contains an essay on fruits (i.e., it's not a list; it's in paragraph form) and you're interested in the number of times the word "apple" comes up ("Apple", "ApPlE", "APPLE", etc... all permutations of character cases of the word "apple" is considered to be equivalent to "apple" and thus counts as an occurrence). </p>
  
  <p>What is one way you can do this is a bash script?</p>