Shell Script to Print Numbers From 1 to 100 Using Regular Expression on Command Line Full Tutorial For Beginners

 

 

numbers.sh

 

 

#shell script to print numbers 1 to 100
#using while loop and expr

i=1
while [ $i -le 100 ]
do
    echo $i
    i=`expr $i + 1`
done

Leave a Reply