Input
I have a playlist files seems
#file 1: i.m3u C:\Users\curlywei\Music\........\a.mp3 C:\Users\curlywei\Music\........\b.mp3
#file 2: j.m3u C:\Users\curlywei\Music\........\x.mp3
Above files are in the same folder.
Expect Output
#file 1: i.m3u ~/Desktop/Music/......./a.mp3 ~/Desktop/Music/......./b.mp3
#file 2: j.m3u ~/Desktop/Music/......./x.mp3
Command I do
for i in $(ls *.m3u| tr '\n' ' '); do sed 's#\#/#g' -e 's#C:/Users/curlywei/Music#~/Desktop/music#g' $i; done
Actual result
#file 1: i.m3u C:/Users/curlywei/Music/......../a.mp3 C:/Users/curlywei/Music/......../b.mp3
#file 2: j.m3u C:/Users/curlywei/Music/......../x.mp3
Only \
is replaced with /
没有评论:
发表评论