Create Your Own Quick Calculator Function for the Terminal
Posted
by The Geek
on How to geek
See other posts from How to geek
or by The Geek
Published on Thu, 03 Feb 2011 13:00:13 +0000
Indexed on
2011/02/03
15:28 UTC
Read the original article
Hit count: 220
If you’re anything like me, you’ve always got a Terminal window open, and you probably have even assigned a hotkey to bring it up anytime. So why open up the boring calculator when you can solve equations right there on the command line?
This is a simple method for creating a calculator using the built-in function support in the Bash shell. Essentially all we’re doing is assigning the question mark to run the bc command with whatever arguments you type after it.
© How to geek or respective owner