数字循环
sum=0
for((i=1;i<=10;i++))
do
sum=$(($sum+$i))
echo "$i:$sum"
done
字符循环
for i in `ls ./`
do
echo "$i"
done
路径循环
for i in ./*
do
echo "$i"
done
sum=0
for((i=1;i<=10;i++))
do
sum=$(($sum+$i))
echo "$i:$sum"
done
for i in `ls ./`
do
echo "$i"
done
for i in ./*
do
echo "$i"
done