title: SET /a var= grep -wc word file.txt in BATCH
body: <p>In BATCH file,how to get correct answer for </p>
  
  <pre><code>SET /a var= grep -wc word file.txt
  echo %var%
  </code></pre>
  
  <p>means I want the output of grep command to be stored in variable.</p>