标签:bsp nbsp 均值 for var awk 1.3 pre int
#!/bin/bash a[0]=1.2 a[1]=1.3 i=0 for var in ${a[@]} do let i++ sum=`echo $sum $var | awk ‘{ print $1+$2 } ‘` done echo $sum $i | awk ‘ { printf("%.3f", $1/$2) } ‘
标签:bsp nbsp 均值 for var awk 1.3 pre int
原文地址:https://www.cnblogs.com/gardonkoo/p/10035758.html