You are viewing a single comment's thread. Return to all comments →
what if i want to increment inside the loop?
Then you can use while [ $i -le 100 ], also make sure to initialize i=1 in this case.
while [ $i -le 100 ]
You can also use C like construct : for (( i=1; i<=100; i+=2 )), but then again, this won't allow you to increment inside loop.
for (( i=1; i<=100; i+=2 ))