You are viewing a single comment's thread. Return to all comments →
Then you can use while [ $i -le 100 ], also make sure to initialize i=1 in this case.
while [ $i -le 100 ]
i=1
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 ))
Seems like cookies are disabled on this browser, please enable them to open this website
Looping and Skipping
You are viewing a single comment's thread. Return to all comments →
Then you can use
while [ $i -le 100 ]
, also make sure to initializei=1
in this case.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.