Skip to content

Commit

Permalink
duh2: Adding numfmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyamakawatt authored and toddyamakawa committed Nov 9, 2024
1 parent 2180a1a commit c3076a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion duh2
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ du 2>/dev/null | while read -r size dir; do
*.zCui.work/*) continue;;
esac

printf '%8s %s\n' "$size_mb" "$dir"
printf '%8s %s\n' "$size" "$dir" | numfmt --from-unit=1024 --to iec
#printf '%8s %s\n' "$size_mb" "$dir"
[[ "$(dirname "$dir")" == '.' ]] && echo
[[ -d "$dir/.git" ]] && echo
done
Expand Down

0 comments on commit c3076a7

Please sign in to comment.