标签:for until while bash linux
#!/bin/bash # declare -i I=1 declare -i SUM=0 while [ $I -le 100 ]; do let SUM+=$I let I+=1 done echo "1+2+3+...+100=$SUM"
bash中的循环控制语句
原文地址:http://blog.csdn.net/ucan23/article/details/45603589