Update progress.sh

This commit is contained in:
Kroese 2024-05-04 15:54:16 +02:00 committed by GitHub
parent 15dc8197e8
commit 5090145e31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ do
if [ -z "$total" ]; then if [ -z "$total" ]; then
size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/') size=$(numfmt --to=iec --suffix=B "$bytes" | sed -r 's/([A-Z])/ \1/')
else else
size=$(printf '%.1f\n' "$(($bytes*100*100/$total))e-2") size=$(printf '%.1f\n' "$((bytes*100*100/total))e-2")
size="$size%" size="$size%"
fi fi
echo "${body//(\[P\])/($size)}"> "$info" echo "${body//(\[P\])/($size)}"> "$info"