写出 shell 脚本中所有循环语法 for 循环 : for i in $(ls);do
echo item:$i
done while 循环 : #!/bin/bash
COUNTER=0
while [ $COUNTER -lt 10 ]; do
echo The counter is $COUNTER
let COUNTER=COUNTER+1
done until 循环 : #!/bin/bash
COUNTER=20
until [ $COUNTER -lt 10 ]; do
echo COUNTER $COUNTER
let COUNTER-=1
done