From db85ade3e3f4e69eff8392e239730adb7c3dc1b7 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 18 Aug 2024 17:50:38 +0200 Subject: [PATCH] fix: Progress calculation (#581) --- src/progress.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/progress.sh b/src/progress.sh index e50d65e5..48daedaf 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"