diff --git a/modules/calculate/calculate.sh b/modules/calculate/calculate.sh new file mode 100755 index 0000000..01a1bf5 --- /dev/null +++ b/modules/calculate/calculate.sh @@ -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 "$*")"