How do you get around floats to the nearest tenths with bc. I have a variable called loadMin
loadMin=$(uptime | cut -d" " -f14 | cut -c 1-4)
which returns the average load per minute with two decimal places. Ie 0.01 0.02 0.09. I need the number to be rounded to the nearest tenth. For example, rounded to 0.0 or 1.09 rounded to 1.1
Any help is appreciated.
source share