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:
#!/bin/bash
for a in {1..3400..34}
do
printf "awk 'NR>=$a&&NR<=$b { if (/^[0-9]/) sum++} END {print "row\t", sum }' file "
done
but I want to specify both variables ($a,$b), something like this which is not working! :
for a in {1..3400..34} , for b in {35..3400..34}
do
printf "awk 'NR>=$a&&NR<=$b { if (/^[0-9]/) sum++} END {print "row\t", sum }' hydr_dE.txt && "
done
Thanks,
abandstepto make the question simpler.