#!/bin/bash i=1 s=0 while [ $i -le 100 ] do s=$(( $s+$i )) i=$(( $i+1 )) done echo "The sum is: $s"
转载于:https://blog.51cto.com/lidongfeng/1943284
#!/bin/bash i=1 s=0 while [ $i -le 100 ] do s=$(( $s+$i )) i=$(( $i+1 )) done echo "The sum is: $s"
转载于:https://blog.51cto.com/lidongfeng/1943284