Return to Snippet

Revision: 63576
at May 18, 2013 07:50 by brownrl


Initial Code
#!/bin/bash

# save this file to 'c' in your bin dir,
# use 'c 7 + 7' or 'c 5 / 3' 

bc << EOF
scale=4
$@
quit
EOF

Initial URL
http://www.itsgotto.be/cv.php

Initial Description
This is a simple wrapper to bc to perform basic calculator duties. with up to 4 decimal place precision. its just one of those things you might find useful. Then again all the os's out there have a gui calc easily ready too.

Initial Title
Simple Command Line Calculator

Initial Tags
Bash, script

Initial Language
Bash