while DEMO

while DEMO

#!/bin/bash
#author:xiluhua
#since:20160619
let v_count=0
while [ "1" = "1" ]
do
    if [ $v_count -lt 5 ]
    then
        sleep 1
        echo $v_count
        let v_count=$v_count+1
    else
        echo "exit"
        break
    fi
done

 

posted @ 2016-06-19 17:26  xiluhua  阅读(277)  评论(2编辑  收藏  举报