SHELL Script Looping

 

For Loop

for a in seq 1 1 10
do
echo "$a"
done

While Loop

a=0
while [ $a -lt 5 ]
do
echo "$a"
a=expr $a + 1
done

Until

a=10
while [ $a -lt 5 ]
do
echo "$a"
a=expr $a - 1
done

Comments

Popular posts from this blog

Oracle Database 19C Performance Tunning - PART 1

Oracle Patching Using Opatch Utility

Oracle RMAN Backup And Restore

PostgreSQL Opensource Installation in RHEL or Oracle Linux(OEL) 8 and above

Pg_pool-II Installation and Configuration