continue,break,exit小例子

[root@shnne ~]# vim test.sh
#!/bin/sh
for ((i=0; i<=5; i++))
do
   if [ $i -eq 3 ]
    then
       #continue
       #break
       exit
   fi
echo $i
done
echo "ok"
分享到:
关键词:Linux运维Shell

网友留言(0 条)

发表评论