27

Tip #216   Create a Terminal Calculator

Put the following in your .bashrc file

function calc { echo "${1}"|bc -l; }


Usage:
$ calc 2+2
4
$ calc "sqrt(2)"
1.41421356237309504880