dc - syntax question
the.lists at mgm51.com
Fri Apr 24 16:14:13 UTC 2015
I've been staring at this for a bit, trying to understand what I'm
doing incorrectly. Maybe I'm blinded to my error because I'm too
close to it. In any case....
I have an expression that I want to use dc to evaluate. I want zero
decimal places in the answer. I've simplified my more complex
expression down to something simple.
# dc -e "100 .333 * p"
I'd like to see 33 as the answer, not 33.300
So I then tried
# dc -e "100 .333 * 0k p"
and I still got 33.300 as the answer.
I had thought that the "0k" would result in a precision of zero,
i.e., zero decimal places in the answer.
Where have I gone astray?
More information about the freebsd-questions