while与until循环基本语法

while与until循环基本语法

#!/bin/bash

# demo while

i=1

while [ $i -lt 10 ];do
  echo $i
  (( i++ ))
done

# demo until

i=1

until [ $i -gt 10 ];do
  echo $i
  (( i++ ))
done

网页名称:while与until循环基本语法
分享链接:http://scyanting.com/article/gcoegp.html