better formatting for fastdu humanreadable

This commit is contained in:
q
2018-08-12 09:26:12 +03:00
parent 1864c8acb9
commit cbc826bc8f

View File

@@ -87,9 +87,14 @@ if [[ "$SUMMARY" -eq 1 ]]; then
# Display one line
processfolder "${what[@]}"
else
if [[ "$HUMAN" -eq 1 ]]; then
FORMAT="%8s %s\n"
else
FORMAT="%d\t%s\n"
fi
# One size for each argument
for dir in "${what[@]}"; do
printf "%s\t%s\n" "$( processfolder "$dir" )" "$dir"
printf "$FORMAT" "$( processfolder "$dir" )" "$dir"
done
fi