From 4142b4ac5b9619268e0e8b99624eed6100085c4d Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 18 Aug 2024 17:53:59 +0200 Subject: [PATCH] fix: Progress calculation (#134) --- src/progress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/progress.sh b/src/progress.sh index e50d65e..48daeda 100644 --- a/src/progress.sh +++ b/src/progress.sh @@ -28,7 +28,7 @@ do if [ -z "$total" ] || [[ "$total" == "0" ]]; then size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/') else - size=$(printf '%.1f\n' "$((bytes*100*100/total))e-2") + size="$(echo "$bytes" "$total" | awk '{printf "%.1f", $1 * 100 / $2}')" size="$size%" fi echo "${body//(\[P\])/($size)}"> "$info"