📜  数组元素之和 bash - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:03.061000             🧑  作者: Mango

代码示例1
read -a array
tot=0
for i in ${array[@]}; do
  let tot+=$i
done
echo "Total: $tot"