Shell Calc
-
Comments:
- here.
Whenever I need to do any calculations, I generally drop into python and do them from there. However, I came across a neat tip over on Mac Geekery: When You Need A Calculator. I’ve modified is ever so slightly so it goes into a .profile
instead of a .bashrc
:
function calc
{
awk "BEGIN {print $* ; }"
}
Sweet.