summaryrefslogtreecommitdiff
path: root/calculator.sh
diff options
context:
space:
mode:
Diffstat (limited to 'calculator.sh')
-rwxr-xr-xcalculator.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/calculator.sh b/calculator.sh
new file mode 100755
index 0000000..f66726e
--- /dev/null
+++ b/calculator.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+# Calculator using bc
+# Usage:
+# $ c 3*5
+function c() {
+ printf "%s\n" "$@" | bc -l;
+}