Using bash, how can i find out the average, max and min from a list of numbers?
Solution 1:
Since you're already using awk
blahblahblah | awk '{if(min==""){min=max=$1}; if($1>max) {max=$1}; if($1<min) {min=$1}; total+=$1; count+=1} END {print total/count, max, min}'
Solution 2:
I find this program useful for generating stats on lists of numbers at the command line: http://web.cs.wpi.edu/~claypool/misc/stats/stats.html