Round number to 10 in Bash

Viewed 1090

I made a simple function where the result is e.g. 64.998472747. Is there a way this can be rounded up to 60? If it is 65.998472747 to be rounded to 70? Is this possible in Bash?

light=62.998472747
printf "$.0f" "$light"

So my function only rounds to a whole number. In this case it is going to round it to 63.

Thank you!

2 Answers
Related