title: Use for loop with two variable
body: <p>I have a question about for loop in Bash
  I want to run awk command for specific range increasing by 34 but I don't know how to specify two variable in a for loop. 
  I know how to do it for one variable but it is not working for two. 
  this is my code for one variable: </p>
  
  <pre><code>#!/bin/bash
  for a in {1..3400..34}
  do
  printf "awk 'NR&gt;=$a&amp;&amp;NR&lt;=$b { if (/^[0-9]/) sum++} END {print "row\t", sum }' file "
  done
  </code></pre>
  
  <p>but I want to specify both variables ($a,$b), something like this which is not working! :</p>
  
  <pre><code>for a in {1..3400..34} , for b in {35..3400..34}
  do
  printf "awk 'NR&gt;=$a&amp;&amp;NR&lt;=$b { if (/^[0-9]/) sum++} END {print "row\t", sum }' hydr_dE.txt &amp;&amp; "
  done
  </code></pre>
  
  <p>Thanks,</p>