[root@web03 server]# cat 66.sh #!/bin/bash flag=true a=0 b=0 while $flag do echo "${a}" ((a++)) while $flag do echo "$b" ((b++)) if [ ${b} -gt 4 ] then flag=false echo "${flag} 99999" fi done sleep 3 done
[root@web03 server]# cat 66.sh #!/bin/bash flag=true a=0 b=0 while $flag do echo "${a}" ((a++)) while $flag do echo "$b" ((b++)) if [ ${b} -gt 4 ] then flag=false echo "${flag} 99999" fi done sleep 3 done