shell脚本之while
Posted 旅行者3468号
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了shell脚本之while相关的知识,希望对你有一定的参考价值。
#! /bin/bash echo if num smaller than 5,it will continue num=0 while [ $num -lt 5 ] do echo now the num is $num let num++ done
[[email protected] Desktop]# ./while.sh if num smaller than 5,it will continue now the num is 0 now the num is 1 now the num is 2 now the num is 3 now the num is 4
以上是关于shell脚本之while的主要内容,如果未能解决你的问题,请参考以下文章