aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/mean.awk2
-rw-r--r--bin/med.awk3
-rw-r--r--bin/mode.awk2
-rw-r--r--bin/tot.awk2
-rw-r--r--man/man1/med.1df5
-rw-r--r--man/man1/tot.1df2
6 files changed, 7 insertions, 9 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 }
diff --git a/man/man1/med.1df b/man/man1/med.1df
index 1d9bbf7f..0cef9e42 100644
--- a/man/man1/med.1df
+++ b/man/man1/med.1df
@@ -14,8 +14,7 @@ file1 file2
.SH DESCRIPTION
.B med
collects all the newline-delimited numbers given as input, and prints the
-median. It uses the floor of the mean of the two median values if the number of
-records is even. The input must be sorted, and a warning will be issued if it
-isn't.
+median. It uses the mean of the two median values if the number of records is
+even. The input must be sorted, and a warning will be issued if it isn't.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>
diff --git a/man/man1/tot.1df b/man/man1/tot.1df
index ed2983a2..eb8dd4b7 100644
--- a/man/man1/tot.1df
+++ b/man/man1/tot.1df
@@ -1,7 +1,7 @@
.TH TOT 1df "September 2016" "Manual page for tot"
.SH NAME
.B tot
-\- print a count of entries in a directory
+\- sum a list of numbers
.SH SYNOPSIS
printf '%u\\n' 5 9 53 145 |
.B tot