From 196b35341237946448fea2b9ceaf47a5c5e6afbf Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 11 Oct 2014 23:23:28 +0200 Subject: [PATCH] README: Add Counting Votes recipe --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 827e50b..cd5c4e8 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,10 @@ permissions for all but the owner. It should just work; you may need to adjust the `votes.txt` path currently hardcoded in `web-ballot.pl`, where the cast votes are recorded. + +Counting Votes +-------------- + +This script will show just the final vote for each token: + + perl -nle 'chomp; @b = split/,/; $a{$b[0]} = [@b]; END { for (values %a) { print join(",", @$_); } }' ~/votes.txt