bc is a *nix calculator that can provide a command line equivalent for gnome-calculator for quick calculations. bc can do detailed mathematical calculations in programs or can be a very basic calculator. To use bc just type bc and return and enter 2*2. This isn’t so bad but it would be better just to enter bc 2*2 from the command line. A basic script will do this:
#!/bin/bash
echo "$*" | bc
mpc
A program mpc isn’t more useful than GUI equivalents unless you use the terminal alot. MPD fronts like Gimmix and GMPC, and even Sonata leave small footprints and do a nice job of creating playlists.
Mpc is very simple and easy to use though, to install in Gentoo:
sudo emerge USE="bash-completion" mpc
A little setting up is necessary. For bash-completion a script will need to be entered into ~/.bashrc.
cat /usr/share/doc/mpc-0.12.1/mpc-bashrc >> ~/.bashrc
By default, mpc connects to localhost:6600 edit this in the ~/.bashrc if using MPD on a network: host or password@host.
mpc listall
mpc add Rock/Bon-Jovi/Its-my-life.mp3
mpc play
References
Whenever I need a calculator I just start python (actually ipython, a better interactive python). You have all the power of a calculator with all the nice things a mature programming language gives you (like variables, functions, iterators).
You can type 2*2 or 13**7 (which means 13^7) but can also quickly get to more complex calculations seamlessly.
nice, I hadn’t thought of this – python functioning as a calculator. Very very handy if doing a good amount of programming. python looks like it handles functions as such similar to bc:
a=3
a+1
4
define f(x) { return x+2 }
f(3)
5