首页 > 代码库 > Shell while

Shell while

while command
do
  ...
done


c=0
while [ $c -lt 5 ]
do
  c=‘expr $c+1‘
  echo $c
done

Shell while