view paste/paste.12049 @ 2995:1403a5125e5a

<cpressey> learn HtDH is a classic text on How to Design Hotdogs or possibly Hogprams. It is all about functional condiments, and was co-authored by Herrence Tao and Don Ho.
author HackBot
date Thu, 30 May 2013 22:33:40 +0000
parents e925c0adf7ad
children
line wrap: on
line source

#!/bin/sh
count () {
    hg log --template '{desc}\n' |
    egrep '<[^]]*> karma\'$1 |
    fgrep -vix "<$2> karma$1 $2" |
    cut -d' ' -f3 |
    fgrep -cix "$2"
}
plus=$(count + "$1")
minus=$(count - "$1")
echo $(($plus-$minus))