Advertisement

06.12.2006 at 08:09PM PDT, ID: 21884099
[x]
Attachment Details

How to round numbers in bash

Asked by Tigger996 in Linux Programming

Tags: bash, round, number

I have a text file that I read for a number
Sometimes the number can be 1 decimal place other times it can have up to 3.  It's a temperature reading.  so 29.765 or 55.5 or 99.32

In bash, is there a way to make it 29.8, leave it at 55.5 and 99.3 ???

Start Free Trial
[+][-]06.12.2006 at 11:46PM PDT, ID: 16891984

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Programming
Tags: bash, round, number
Sign Up Now!
Solution Provided By: da99rmd
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32