5 echo "renaming content of $i ..."
9 dst_file="`echo $j | sed 's/\ /\\ /g' | sed 's/(/\\(/g' | sed s'/)/\\)/g' | sed 's/&/\\&/g' | sed 's/!/\\!/g'`"
10 trg_file="`echo $j | sed 's/\ /_/g' | sed 's/&/_/g'| sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,!/abcdefghijklmnopqrstuvwxyz_____/'`"
11 if [ "$dst_file" != "$trg_file" ]; then
12 mv "$dst_file" $trg_file
19 album="`echo $j | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,/abcdefghijklmnopqrstuvwxyz____/'`"
21 dst_file="`echo $song | sed 's/\ /\\ /g' | sed 's/(/\\(/g' | sed s'/)/\\)/g' | sed 's/&/\\&/g' | sed 's/!/\\!/g'`"
22 trg_file="`echo $song | sed 's/\ /_/g' | sed 's/&/_/g'| sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,!/abcdefghijklmnopqrstuvwxyz_____/'`"
23 if [ ! -f ../${album}__${trg_file} ]; then
24 mv "$dst_file" ../${album}__${trg_file}
25 chmod 644 ../${album}__${trg_file}