When you need a quick & simple calculator in Bash... #

$ bc -lq
1+1
2
quit
or
$ echo $((1+1))
2
or
$ echo $[1+1]
2

/nix | Jul 17, 2011


Subscribe or visit the archives.