title: How can I format my grep output to show line numbers at the end of the line, and also the hit count?
body: <p>I'm using grep to match string in a file. Here is an example file:</p>
  
  <pre><code>example one,
  example two null,
  example three,
  example four null,
  </code></pre>
  
  <p><code>grep -i null myfile.txt</code> returns </p>
  
  <pre><code>example two null,
  example four null,
  </code></pre>
  
  <p>How can I return matched lines together with their line numbers like this:</p>
  
  <pre><code>  example two null, - Line number : 2
    example four null, - Line number : 4
    Total null count : 2
  </code></pre>
  
  <p>I know -c returns total matched lines, but I don't how to format it properly to add <code>total null count</code> in front, and I don't know how to add the line numbers.</p>
  
  <p>What can I do?</p>