Terminal Tip: Command Line Calculator
Mac OS X ships with a powerful and useful command-line calculator called bc. GNU bc provides an arbitrary precision calculator that allows you to type in expressions for immediate calculation. It uses the standard conventions for computer arithmetic, i.e. + and - are addition and subtraction, * and / are multiplication and division, ^ is exponentiation. So to multiple, say, 193 by two thirds, you'd enter 193 * 2 / 3 and press return. Parentheses set the order of evaluation, just as they would in a normal arithmetic statement or in a computer language. e.g. (20 / 3) ^ 5 performs the division before the exponentiation.
You can also use variables with bc. Just assign them using an "=" command. For example, you can set your principal to 100 with principal=100. The special scale variable indicates the number of digits to show after the decimal point. Enter quit to leave bc.
There's a lot more you can do with bc--it's really a full interactive programming language that goes way beyond the simple convenience of quick calculations. To learn about bc, type
man bc from the command line.
Software Updatesmore updates
- Apple Remote Desktop updated with Yosemite support
- OS X Yosemite 10.10.2, iOS 8.1.3 updates now available
- Sports Illustrated 120 SPORTS channel comes to Apple TV
- Logic Pro X update brings AirDrop support, new effects, tools, and more
- Parallels Access 2.5 released, adds file manager, computer-to-computer remote access
- The Google Translate iOS app is about to get a lot smarter