错误:似乎它显示为 _ 而不是
文件树如下所示:
.
|-- Christina Aguilera
| |-- Back To Basics . Ain't No Other Man.mp3
但是,脚本显示了这一点:
.
|-- Christina Aguilera
| |-- Back To Basics _ Ain't No Other Man.mp3
编码:
tag=$(tail -c 128 $path)
song_name=$(echo "$tag" | cut -c 4-33 | sed -r 's/ +$//')
artist_name=$(echo "$tag" | cut -c 34-63 | sed -r 's/ +$//')
album_name=$(echo "$tag" | cut -c 64-93 | sed -r 's/ +$//')
test -e "$2/$artist_name" || mkdir "$2/$artist_name"
ln -s $path "$2/$artist_name/$album_name _ $song_name.mp3"
done
如何编辑此代码以解决错误?