dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone git://edryd.org/dotfiles
Log | Files | Refs

commit 3db5de7a8abbc9f68166bd18a6c41e8c0c3b1071
parent 788571555e25a9c8a3583ead68e6275f2af87101
Author: Ed van Bruggen <edvb54@gmail.com>
Date:   Sun,  3 Aug 2014 08:30:04 -0700

Bash: Move calc funtion into its own file

Diffstat:
bashrc | 5-----
bin/calc | 9+++++++++
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/bashrc b/bashrc @@ -131,9 +131,4 @@ ipls () { ifconfig | grep 'inet addr:' | awk {'print $2'} } -# do calculations in bash faster -calc () { - echo $1 | bc -l -} - #}}} diff --git a/bin/calc b/bin/calc @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +# +# calc: preform fast calculations on the go +# +# Tired of having to open a new terminal, run `bc`, type the calculation, only +# to exit right after seeing the answer? Suffer no longer! Now just type +# `calc 2+2` and instantly see the answer! + +echo "$@" | bc -l