|
Mac GeekeryGet your geek on. |
mrDoc's blogThe neat calendar CLI tip recently posted reminded me of a handy CLI calculator I use frequently. Adding a function to the .bashrc file such as
calc() {
awk "BEGIN {print $* ; }"
}
Gives a simple command line calculator that can handle floats without the limitations of
calc2() {
awk "BEGIN { CONVFMT = \"%.10g\" ; OFMT =\"%.10g\" ; print $* ; }"
}
Handy CLI tools can be easily created using the standard programs on the systemThere's more » |
|
||||