Skip to content

Commit

Permalink
Fix sorting error in report. Sort apparently doesn't honor the IFS to…
Browse files Browse the repository at this point in the history
… split fields
  • Loading branch information
falconindy committed Jan 13, 2010
1 parent 904f8e1 commit dde831e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion squashfu
Expand Up @@ -309,7 +309,7 @@ action_report () {
# Enumerate bins, sort date order, print human readable create date and size
OLDIFS=$IFS;IFS='$:'
printf "%10s\t%25s\t%7s\n" "Bin ID" "Date Created" "Size"
grep -vE "^[\t ]*$" "$BINVENTORY" | sort -r -k2 -n | while read bin stamp; do
grep -vE "^[\t ]*$" "$BINVENTORY" | sort -r -t: -k2 -n | while read bin stamp; do
printf "%10d\t%25s\t%7s\n" $bin \
"$(date --rfc-3339=seconds --date="1970-01-01 $stamp sec GMT")" \
"$(du -sh ${BINS_DIR}/$bin 2>/dev/null | awk '{print $1}')"
Expand Down

0 comments on commit dde831e

Please sign in to comment.