> Linux Reviews > Tips and Tricks >
Simple calculators
v1.1.2, xiandoThe basics of the calculators you (probably) have installed
1. Simple perl calculator
perl -e "print X*Y/Z+Ablah blah blah;"
Add ;echo to get a new line after the answer:
perl -e "print (3010*2212)/987";echo 6658120
Perl is available for (and installed by default on) all distributions.
2. bc - an even simpler calculator
BC is a supersimple calculator which can't do anything on it's own. Feed it with some numbers using echo, and bc calcultates them:
echo '(3.14*781)+222' | bc 2674.34
Simple bc tips: Use ' ' for calculations more advanced that 2+2. Use dot . instead of comma, .
3. Calculators you probably have installed
KDE: alt-F2 to run a command
xcalc calculator that comes with xfree
kcalc calculator that comes with kde
gnome-calculator calculator that comes with gnome
The irc client has an alias called /calc.
wmcalc is a nice Windowmaker docklet calculator.
Copyright (c) 2000-2004 Øyvind Sæther. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
> Linux Reviews > Tips and Tricks >
Simple calculators