Write a shell script to print all even numbers between 1 to 100. - using while loop

 
    

Write a shell script to print all even numbers 
between 1 to 100. - using while loop




Program =



echo "Utsav Gohel - 91900104011"

n=100

i=1

while [ $i -le $n ]

do

if [ `expr $i % 2` -eq 0 ]

then

echo "$i"

 

fi

i=`expr $i + 1`

done

 


Output =