Added calculate module. Requires calc.

This commit is contained in:
Storm Dragon 2020-08-14 17:04:19 -04:00
parent 9cdb9b4f6e
commit 683330d7d1
1 changed files with 11 additions and 0 deletions

11
modules/calculate/calculate.sh Executable file
View File

@ -0,0 +1,11 @@
[ -f functions.sh ] && source functions.sh
calculate() {
calc -- "$*" | tr -d '[:space:]'
}
name="$1"
shift
chan="$1"
shift
msg "$chan" "$name: $(calculate "$*")"