I thought there was a simple way to write $2+$3+$4+$5 in awk, the equivalent of {2..5} for bash as quoted shruggy.
But you wrote that awk is not able to do it, and a for loop has to be used to get this done.
In this case, the answer could be:
Quote:
awk 'NF { for(i=2;i<=5;i++) {sum=sum+$i} { print sum/NR } }' table
|
Thanks for the help.