bash支持C式的for語句
for((varialbe assignment; condition; iteration process))
該句中有幾項(xiàng)不遵守標(biāo)準(zhǔn)bash shell的for方法
1、變量的賦值可以包含空格
2、條件中的變量不以$開始
3、迭代處理式不用使用expr
eg
for(( i=1; i<=10; i++ ))
do
echo "The next number is $i"
done
for((varialbe assignment; condition; iteration process))
該句中有幾項(xiàng)不遵守標(biāo)準(zhǔn)bash shell的for方法
1、變量的賦值可以包含空格
2、條件中的變量不以$開始
3、迭代處理式不用使用expr
eg
for(( i=1; i<=10; i++ ))
do
echo "The next number is $i"
done


