title: Batch script with nested loops to ping range of IP's
body: <p>Working 1 loop code:</p>
  
  <pre><code>for /l %i in (1,1,254) do @ping 131.212.30.%i -n 1 -w 100 | find "Reply"
  </code></pre>
  
  <p>Not running code where I try to use a counter so every time the ping gets a reply we add 1 to online:</p>
  
  <pre><code>SET online=0 for /L %i in (1,1,254) do for /L %j in (1,1,255) do @ping 131.212.%i.%j -n 1 -w 100 | find "Reply" SET /A online=online+1
  </code></pre>
  
  <p>Thanks a lot.</p>