command line calculator

calc(){ awk "BEGIN{ print $* }" ;}
simple function , floating point number is supported.

12
By: twfcc
2009-10-23 06:03:07
awk

3 Alternatives + Submit Alt

What Others Think

I love this. Much easier than my previous favorite (also listed here): echo "expr" | bc
mscar · 637 weeks and 2 days ago
Thanks! I created command "calc" from this that I can use from the command line at any time (faster than echo "equation" | bc) ~/bin/calc #!/bin/bash ARG=("$@") x=$( printf "%s" "${ARG[@]}" ) calc(){ awk "BEGIN{ print $* }" ;} calc $x
jrparris · 620 weeks and 6 days ago
But at least it didn’t change its tone and the ending was rather satisfactory. https://https://193.168.195.169.com
lemeyiy711 · 3 weeks and 3 days ago
Thanks for sharing your ideas. I might also like to convey that video games have been actually evolving. Modern tools and innovations have made it easier to create practical and interactive games. These types of entertainment games were not that sensible when the real concept was first being used. Just like other styles of technological innovation, video games way too have had to grow by means of many ages. This itself is testimony towards the fast growth and development of video games. US WIZA BIZNESOWA
wenilak444 · 2 weeks and 5 days ago
I have learned result-oriented things via your website. One other thing I want to say is newer laptop operating systems are inclined to allow far more memory to get used, but they likewise demand more storage simply to operate. If your computer could not handle a lot more memory as well as the newest application requires that ram increase, it usually is the time to buy a new Laptop or computer. Thanks ????? ???????
nakav51247 · 2 weeks and 3 days ago
disco lights with built-in laser x-y scanner are the coolest stuff that you can add to your disco room** jav
wenilak444 · 2 weeks and 2 days ago
Youre so cool! I dont suppose Ive read anything in this way just before. So nice to uncover somebody by original applying for grants this subject. realy i appreciate you for beginning this up. this fabulous website is something that is needed on the web, a person with a bit of originality. helpful project for bringing something totally new for the world wide web! nclex practice test
wenilak444 · 2 weeks and 1 day ago
Bless you designed for presenting modern up-dates concerning the anxiety, As i watch for browse alot more. minecraftskindex
KayGasaway · 2 weeks and 1 day ago
Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. https://www.createemailaccounts.net/
KayGasaway · 1 week and 6 days ago
It’s best to take part in a contest for top-of-the-line blogs on the web. I will suggest this website! ?O ka palapala noi ?o US Visa Online
nakav51247 · 1 week and 4 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: