diff options
author | Juergen Daubert <jue@jue.li> | 2015-09-25 14:50:53 +0200 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2015-09-25 14:50:53 +0200 |
commit | 087045a93aaa8af8c331945e196ded671de1d1de (patch) | |
tree | 779e3cdc30da7269113d828e8d9d7b75e9220fa4 | |
parent | 12243739d3402e572a5fe5889c5573b63e1473a9 (diff) | |
download | prt-utils-087045a93aaa8af8c331945e196ded671de1d1de.tar.gz prt-utils-087045a93aaa8af8c331945e196ded671de1d1de.tar.xz |
pkgsize: allow spaces in filenames
-rw-r--r-- | pkgsize | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -95,11 +95,11 @@ byteall=0 while read line do - file="/"$line + file="/${line/ /\\ }" - if [ -f $file ]; then - filesize=`/usr/bin/du -k $file` - size=`echo $filesize | awk '{print $1}'` + if [ -f "$file" ]; then + filesize=$(/usr/bin/du -k $file) + size=$(echo $filesize | awk '{print $1}') if [ "$verbose" = "true" ]; then printf "%10s %s\n" $size $file |