bash 3-expression for loop code example
Example 1: bash for loop
#!/bin/bash
for (( c=1; c<=5; c++ ))
do
echo "Welcome $c times"
done
Example 2: For loop in shell script
for i in `seq 1 10`
do
echo $i #Do something here.
done
#!/bin/bash
for (( c=1; c<=5; c++ ))
do
echo "Welcome $c times"
done
for i in `seq 1 10`
do
echo $i #Do something here.
done