command-line calculations using bc

70
Rob Newcater writes “If like me, you do most of your work from the command-line,
using vim to edit files, mutt for e-mails, cd/ls/mv/find/etc instead
of a file manager, then you may get annoyed by having to fire up
a GUI calculator to make (what may sometimes be) a single calculation.

This article shows how to quickly perform standard calculations
on the command line including
addition, subtraction, multiplication, division, square root,
powers, conversion from decimal to hex, decimal to binary, hex to
decimal, and binary to decimal. It also briefly introduces using
bc in interactive mode and how to write files for
use with bc for frequently repeated operations.
There is a mention of using Google for performing calulations.
It finishes with a little challenge to test the power of your CPU.

Please see the full article on Basically Tech: command-line calculations using bc.”

Link: basicallytech.com

Category:

  • Linux