aboutsummaryrefslogtreecommitdiff
path: root/bin/tot.awk
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-09-02 00:18:50 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-09-02 00:18:50 +1200
commit62dbc06c52f460ec297a3c3c48db77f04f285d0f (patch)
tree3754774e63260c0bf9899da8c17af7bcdf31deb2 /bin/tot.awk
parentFix POSIX non-compliance in cfr(1) (diff)
downloaddotfiles-62dbc06c52f460ec297a3c3c48db77f04f285d0f.tar.gz
dotfiles-62dbc06c52f460ec297a3c3c48db77f04f285d0f.zip
Add tot(1df)
Diffstat (limited to 'bin/tot.awk')
-rw-r--r--bin/tot.awk3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/tot.awk b/bin/tot.awk
new file mode 100644
index 00000000..c25c718d
--- /dev/null
+++ b/bin/tot.awk
@@ -0,0 +1,3 @@
+# Total a column of integers
+{ tot += $1 }
+END { printf "%u\n", tot }