From d5963aade889a2ea421f511046a5248418521c00 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 5 Dec 2023 21:57:49 -0600 Subject: [PATCH] Update default.inc --- default.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default.inc b/default.inc index 54858ac..dd4a145 100755 --- a/default.inc +++ b/default.inc @@ -135,7 +135,9 @@ ANYKEY2CONTINUE(){ echo -e "\e[1A\n\e[0K\r\n" } ROUND_NUMBER(){ - echo $(echo $1 | awk '{print int($1+0.5)}') + [ "${2}" != "" ] && decimals_to_round=${2} || decimals_to_round=0 + # echo $(echo $1 | awk '{print int($1+0.5)}') + echo $(echo $1 | awk '{printf "%.${decimals_to_round}f\n", $1}') } SHOW_TIME() { num=$(ROUND_NUMBER ${1})