title: I am very new to BASH Scripting, How do I keep a running total (count) of the keyword hits (grep) in a file and then display totals in the end?
body: <p>count= `grep success &lt;fileName.txt&gt;</p>
  <p>The above will only give me a total count of the word &quot;success&quot; but I want to keep a running total. For example, if there is a total of 'expected' 25 hits of which only 20 were found. This would mean that there were 5 failures. So I think I need to keep a running total so in the end I can report (echo) as follows:</p>
  <p>20 out of 25 expected success found; 5 failures.</p>