irc-bot/firebot

24 lines
279 B
Plaintext
Raw Normal View History

2010-12-15 22:36:16 -07:00
#! /bin/sh
cmd=${1%% *}
args=${1#* }
case $cmd in
calc)
printf "%s = " "$args"
printf "%s\n" "$args" | bc -l
;;
units)
src=${args% ->*}
dst=${args#*-> }
units -1 -v -- "$src" "$dst"
;;
*)
exit 1
;;
esac
2010-12-15 22:36:16 -07:00