while-do examples in bash

whiledo1.sh

#!/bin/bash

c=1
while [ $c -le 5 ]
do
	echo "Welcome $c time"
	(( c++ ))
done

whiledo2.sh
#/bin/bash

count=0
num=10

while [ $count -lt 10 ]
do
	echo
	echo $num seconds left to stop this process $$
	echo
	sleep 1

	num=`expr $num - 1`
	count=`expr $count + 1`
done

echo
echo $$ process is stopped!
echo