aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-10-25 11:11:30 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-10-25 11:12:46 +1300
commitf530a5fea7d733ef996fd6ba815d318af06094f0 (patch)
tree9a99fcc1a372a2c015d81f771295fb825b50a0a6 /bin
parentRestore missing header to maybe(1df) manual (diff)
downloaddotfiles-f530a5fea7d733ef996fd6ba815d318af06094f0.tar.gz
dotfiles-f530a5fea7d733ef996fd6ba815d318af06094f0.zip
Corrections to a few of the agg scripts
Diffstat (limited to 'bin')
-rw-r--r--bin/mean.awk2
-rw-r--r--bin/med.awk3
-rw-r--r--bin/mode.awk2
-rw-r--r--bin/tot.awk2
4 files changed, 4 insertions, 5 deletions
diff --git a/bin/mean.awk b/bin/mean.awk
index 74bdcab3..b34dc111 100644
--- a/bin/mean.awk
+++ b/bin/mean.awk
@@ -1,4 +1,4 @@
-# Get the mean of a list of integers
+# Get the mean of a list of numbers
{ tot += $1 }
END {
# Error out if we read no values at all
diff --git a/bin/med.awk b/bin/med.awk
index 34d81c41..83f0eb74 100644
--- a/bin/med.awk
+++ b/bin/med.awk
@@ -1,5 +1,4 @@
-# Get the median of a list of integers; if it has to average it, it uses the
-# integer floor of the result
+# Get the median of a list of numbers
{ vals[NR] = $1 }
NR > 1 && vals[NR] < vals[NR-1] && !warn++ {
printf "med: Input not sorted!\n" > "/dev/stderr"
diff --git a/bin/mode.awk b/bin/mode.awk
index 500fce2a..e43de98e 100644
--- a/bin/mode.awk
+++ b/bin/mode.awk
@@ -1,4 +1,4 @@
-# Get mode of a list of integers
+# Get mode of a list of numbers
# If the distribution is multimodal, the first mode is used
{ vals[$1]++ }
END {
diff --git a/bin/tot.awk b/bin/tot.awk
index d1174d7b..eda25724 100644
--- a/bin/tot.awk
+++ b/bin/tot.awk
@@ -1,3 +1,3 @@
-# Total a column of integers
+# Total a list of numbers
{ tot += $1 }
END { print tot }