I love this, even though I didn't think of it myself. ;-)
Want a simple calculator that works at the Terminal prompt? As per the suggestion on this website, just put this in your ".cshrc" (or "aliases.mine" as the case may be):
alias calc 'awk "BEGIN{ print \!* }" ' That's it. Then run% source .cshrcand you can do basic arithmetic in the Terminal application:
% rehash
% calc 545+56I like this especially because now I don't have to use the wretched Numlock key on my iBook.
601
% calc 545-56
489
% calc 545*56
30520
% calc 545/56
9.73214
Mac OS X Hints
http://hints.macworld.com/article.php?story=20011230230103566