#!/bin/bash function rm-ALL-blank() { ls "$1"| whileread file do #echo $newfile if [ -d"$1/$file" ]; then newfile=`echo$file | sed 's/ //g'` mv "$1/$file""$1/$newfile" 2>/dev/null rm-ALL-blank "$1/$file" fi done }
rm-ALL-blank $1
Pictures to pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/bash functionmyconvert() { ls "$1"| whileread file do if [ -d"$1/$file" ] then find "$1/$file" -maxdepth 1 -name "*.jpg"|sort 1>"$1/$file/_myTmp_" if [ -s"$1/$file/_myTmp_" ]; then echo"$1/$file".pdf convert @"$1/$file/_myTmp_""$1/$file".pdf else myconvert "$1/$file" fi fi rm "$1/$file/_myTmp_" 2>/dev/null done }
myconvert $1
Move pdf
1 2 3 4 5
mkdir ../pdf for pdf in `find . -name "*.pdf"` do mv $pdf ../pdf/ done