魅族M3播放列表制作工具

博客里没多少技术文章,贴上来充充数:) 没学过bash,边搜资料边请教别人边写,写了两天,nnd,累死了。 #!/bin/bash IFS=’ ‘ dirscan() { ls -1 “$1” | while read filename do if [ -d “$filename” ]; then cd “$filename” dirscan `pwd` cd .. else path=”${PWD//\//\\}” path=”${path//\\media\\MUSIC\ CARD/}” listname=$(basename “`pwd`”).M3U pathnname=”${savepath}/${listname}” [ ! -e $pathnname ] && touch “${pathnname}” extname=`echo “$filename” | awk -F. ‘{print $NF}’` if [ “$extname” == “mp3” -o …