This is a simple method for creating a calculator using the built-in function support in the Bash shell.

and then the math equation you want solved.

Since this is using the bc command, its pretty powerful.

Create Your Own Quick Calculator Function for the Terminal

Close out the Terminal, re-open it, and you should have the function available.

/wordpress/wp-content/uploads/gg/up/sshot4d37defad712a.jpg

image

image

/wordpress/wp-content/uploads/gg/up/sshot4d37de7678071.jpg

/wordpress/wp-content/uploads/gg/up/sshot4d37de7b2a74b.jpg