Skip to content

Commit

Permalink
fix: Display size in iec format (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Jan 29, 2024
1 parent fca0a71 commit be4745b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/progress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ do
if [ -f "$file" ]; then
bytes=$(du -sb "$file" | cut -f1)
if (( bytes > 1000 )); then
size=$(echo "$bytes" | numfmt --to=si --suffix=B | sed -r 's/([A-Z])/ \1/')
size=$(echo "$bytes" | numfmt --to=iec --suffix=B | sed -r 's/([A-Z])/ \1/')
echo "${body//(\[P\])/($size)}"> "$info"
fi
fi
Expand Down

0 comments on commit be4745b

Please sign in to comment.