diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-02 00:18:50 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-02 00:18:50 +1200 |
commit | 62dbc06c52f460ec297a3c3c48db77f04f285d0f (patch) | |
tree | 3754774e63260c0bf9899da8c17af7bcdf31deb2 /bin/tot.awk | |
parent | Fix POSIX non-compliance in cfr(1) (diff) | |
download | dotfiles-62dbc06c52f460ec297a3c3c48db77f04f285d0f.tar.gz dotfiles-62dbc06c52f460ec297a3c3c48db77f04f285d0f.zip |
Add tot(1df)
Diffstat (limited to 'bin/tot.awk')
-rw-r--r-- | bin/tot.awk | 3 |
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 } |