Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I've got lots of m3u playlists created on my Windows machine inside a folder with file paths to tracks as:

D:\path-of-mp3

So first I want to replace all the \ with / and then D: with /media/etcetc inside the playlist. How do I do that using sed or some other tool to every playlist in folder?

I'm on Linux Mint.

share|improve this question
add comment

1 Answer

sed -i".old" 's|\|/|g; s|^D:/|/media/etcetc/|' *.m3u
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.