Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


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
sed -i".old" 's|\|/|g; s|^D:/|/media/etcetc/|' *.m3u
share|improve this answer

Your Answer


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.