//View Tip #216
Similar Tips
» Fix the previous command
» User input timeout
» Splitting arguments with read
» Change extension on a group of files using only bash builtins an
» Get latest stable version of the Linux kernel


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Put the following in your .bashrc file

function calc { echo "${1}"|bc -l; }

$ calc 2+2
$ calc "sqrt(2)"

View Comments »


Add your comment

Comments are currently disabled
Kaustubh Parker
Thanks, it proved to be very helpful.
Posted 2009-06-15 04:09:11
can u explain this??
Posted 2009-11-23 09:35:29

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit