Simple bash calculator written on Go
$ calc <expression>
expression - any arithmetic expression supported by golang
$ calc 1+1
2
$ calc 1 + 1
2
$ calc 3 + 3 * 3
12
$ calc "(3 + 3) * 3"
18
Supported operands: +, -, *, /, %
$ go get github.com/mkrou/calc
$ sudo mv $GOPATH/bin/calc /usr/local/bin/=
Now you can evaluate expressions simply by typing =
in your shell:
$ = 1 + 1
2