title: Passing variable to grep in shell
body: <p>I have written the following shell to count the number of lines starting with the pattern of " A valA B valB". However, I think that I have not passed variables properly. Any help to fix that? </p>
  
  <pre><code>for i in {0..16};
  do
      for j in {0..16}; 
      do
          echo A $i B $j 
          grep '^ A : "$i" B : "$j"' file | wc -l
      done
  done
  </code></pre>