xref: /illumos-gate/usr/src/test/util-tests/tests/awk/examples/awk/t.avg (revision 3665ce8aeee26b1a84fb98951ef011e0779e1ae2)
1{s = s + $1; c = c + 1}
2END {
3print "sum=", s, " count=", c
4print "avg=", s/c
5}
6