syntax of for loop in bash script code example
Example 1: bash for i
for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done
Example 2: For loop in shell script
for i in `seq 1 10`
do
echo $i #Do something here.
done
for VARIABLE in 1 2 3 4 5 .. N
do
command1
command2
commandN
done
for i in `seq 1 10`
do
echo $i #Do something here.
done