From 48dcaef12d0c5c6e5c39027aba0cd1f4d3b8757f Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 18 Aug 2024 17:51:14 +0200 Subject: [PATCH] fix: Progress calculation --- 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"