What is the syntax for a Bash for loop?
for
I have tried:
for (($i=0;$i<10;$i ++)) do echo $i done
I get this error:
Another way
for i in {0..9} do echo $i done
Replace
for (($i=0...
with
for ((i=0;i<10;i++))
The portable way is:
for i in `seq 0 9` do echo "the i is $i" done