If you spend most of your time in the command line, you don’t want to leave to do math. Qc is a script that does in-line command line math without forcing you to exit the main bash prompt as you might with a program like bc
or a language interpreter.
#!/bin/bash
python -c "print $1"
Make the script executable with the command:
$ chmod +x qc.sh
Alias it to qc
by editing the .bash_profile
file in your home folder and adding the code: