yanfei 发表于 2018-8-25 11:45:59

shell编程(十四)--- until循环

# cat while.sh  
#!/bin/bash
  
declare -i sum=0
  
declare -i i=0
  
while [ $i -le 100 ]
  
do
  
let sum+=$i
  
let i+=1
  
done
  
echo $sum
  
# ./while.sh
  
5050
  
#


页: [1]
查看完整版本: shell编程(十四)--- until循环