hello head
#!/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) } '
hello foot