求和:

cat aa.txt | awk '{a+=$1}END{print “Sum=”,sum}

求商:

cat aa.txt | awk '{printf "%.2f",$1/1024}'

求平均:

cat aa.txt | awk '{a+=$1}END{print a/NR}

求最大值:

cat aa.txt | awk 'BEGIN {max = 0}{if ($1>max) max=$1 fi} END {print "Max=",max}'

求最小值:

cat aa.txt | awk 'BEGIN {min = 1999999}{if ($1<min) min=$1 fi} END {print "Min=",min}'