shell-for循环
for循环格式
1. 直接赋值
for i in 1 3 5
2. 命令赋值
for i in `seq 9`
3. 赋值一个字符串
for i in my name is haha
4. for ((i=1;i<10;i++))
do
echo $i
done
5. for ((n=0,m=10;n<10,m>0;n++,m--))
do
echo "$n $m"
done
When nothing seems to help, I go look at a stonecutter hammering away at his rock, perhaps a hundred times without as much as a crack showing in it. Yet at the hundred and first blow it will split in two, and I know it was not that blow that did it, but all that had gone before. -- Jacob Riis