shell计算100以内加法

#!/bin/bash
#100以内假发
declare -i i=0
declare -i sum=0
while [ $i -le 100 ];do
sum+=$i
let i=i+1
done
echo $sum

原文地址:https://www.cnblogs.com/ty-wk/p/11347070.html