view lib/karma @ 12480:0d2ed32da981 draft

<b_jonas> slashlearn password//The password of the month is If the door to Ambrosia will not open by this music, I will TEAR IT DOWN!
author HackEso <hackeso@esolangs.org>
date Wed, 03 May 2023 20:48:13 +0000
parents 9b8fbae1571a
children
line wrap: on
line source

#!/bin/sh
count () {
    hg log -k '> karma'  --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))