shell for循环

Posted 寻坑者

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell for循环相关的知识,希望对你有一定的参考价值。

for((i=0;i<120;i++))
do
result=`echo dump|nc 127.0.0.1 2181 |grep runtime|grep service |grep vipapis.inventory`;
if [ "${result}" = "" ]
then
#echo $result;
echo "service not found in ZK, waiting ...";
sleep 1;
fi
done

参考:http://www.linuxidc.com/Linux/2012-02/53030.htm

以上是关于shell for循环的主要内容,如果未能解决你的问题,请参考以下文章