for i in ls bash code example
Example 1: for in bash
for i in {0..100..10}
do
echo $i
done
will print #0 10 20 30 40 ...100
Example 2: bash for i
for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done
for i in {0..100..10}
do
echo $i
done
will print #0 10 20 30 40 ...100
for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done