I do something like the following in a Makefile:
echo "0.1 + 0.1" | bc
(in the real file the numbers are dynamic, of course)
It prints .2
but I want it to print 0.2
.
I would like to do this without resorting to sed
but I can't seem to find how to get bc
to print the zero. Or is bc
just not able to do this?