diff options
Diffstat (limited to 'bin/mean.awk')
-rw-r--r-- | bin/mean.awk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/mean.awk b/bin/mean.awk index b34dc111..98060389 100644 --- a/bin/mean.awk +++ b/bin/mean.awk @@ -1,5 +1,6 @@ # Get the mean of a list of numbers -{ tot += $1 } +BEGIN { tot = 0 } +{ tot += $1 + 0 } END { # Error out if we read no values at all if (!NR) |