README: Add Counting Votes recipe

This commit is contained in:
Petr Baudis 2014-10-11 23:23:28 +02:00
parent 3b6b809915
commit 196b353412

View file

@ -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