Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3920
  • Last Modified:

How to round numbers in bash

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 ???

0
Tigger996
Asked:
Tigger996
1 Solution
 
da99rmdCommented:
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now