Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 519

JQ round number to two decimal places

$
0
0

I use jq 1.6 and I try to round the number to two decimal places. How can I do it?

My code:

echo 20.152 | jq -c 'round'

My output:

20

Expected output:

20.15

Viewing all articles
Browse latest Browse all 519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>