Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix bob's karma. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit d191c6278a955ddc73ef16cd47ac047b787ce53a
parent e71329eec9242ef8a5e2b67571503655acbdcecb
Author: Annna Robert-Houdin <[email protected]>
Date: Wed, 19 Jul 2023 14:19:02 +0200
Fix bob's karma.
Diffstat:
M karma | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/karma b/karma
@@ -4,9 +4,9 @@ karmamodbase="$HOME/bin/modules/karma"
karmadb="${karmamodbase}/karma.txt"
function setkarmaval {
- if [ -n "$(grep "^${1}" "${karmadb}")" ];
+ if [ -n "$(grep -P "^${1}\t" "${karmadb}")" ];
then
- sed -i "s,${1}\t.*,${1}\t${2}," "${karmadb}"
+ sed -i "s,^${1}\t.*,${1}\t${2}," "${karmadb}"
else
printf "%s\t%d\n" "${1}" "${2}" >> "${karmadb}"
fi
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.