thanks for your help, but still can not work
below is my test code and result
file path:
/mnt/hgfs/L/BaiduYunDownload/tempL/temppic/2016.02.22 [정홍빛은유혹] 분2 68G/test (2).jpg
my code:
Code: Select all
#!/bin/bash
for each in "$(find /mnt/hgfs/L/BaiduYunDownload/tempL/temppic/* -type f -name '*.jpg')"
do
s=`du -k $each | awk '{print $1}'`
if [ $s -gt 10 ]; then
convert -resize 766 -quality 75 $each $each
convert /mnt/hgfs/L/BaiduYunDownload/tempL/rotate_330_614.png -fill grey50 -colorize 40 miff:- | composite -dissolve 8 -tile - $each $each 2>/dev/null
echo "$each: done!"
fi
done
exit 0
it got error message like below
du: cannot access `/mnt/hgfs/L/BaiduYunDownload/tempL/temppic/2016.02.22': No such file or directory
du: cannot access `[정홍빛은]': No such file or directory
du: cannot access `분': No such file or directory
du: cannot access `유혹2': No such file or directory
du: cannot access `68G/test': No such file or directory
du: cannot access `(2).jpg': No such file or directory
./bash.sh: line 5: [: -gt: unary operator expected"
is it the problem of ImageMagick or other, how to do with this problem?