awk/testdir/t.avg

6 lines
80 B
Plaintext

{s = s + $1; c = c + 1}
END {
print "sum=", s, " count=", c
print "avg=", s/c
}