This is the first time I am using bc. I want to calculate the log (base 10) of a number. How do I this?
Python can come in handy for this as,
log3=$(python -c 'import math; print math.log(3)')
Hope that helps!
If you start bc with the -l switch, then there's a function l() that calculates the natural log of its argument.
bc
-l
l()