grep -v "#EXTINF:" All.m3u | sed 's#../##'g

I'm using the line above to try and make the playlists that I export from Banshee compatible with my digital music player. When I run the sed portion of this script I'm trying to remove the portion of the path up to where the music directories actually start. I jus want the .m3u file to be a list of lines containing Artists/Album/Title.flac

But when I run this script it's removing all of the forward slashes /, not just the beginning ../
Can anyone tell me why it's removing all of the forward slashes and what I might be able to do about it? Thanks.

You need to read up on sed and Linux/Unix regular expressions. The dot (.) has a special meaning - ie, any character. You need to preface each with an escape back slash (in a shell, two back slashes) to tell the tool to consider only a dot. Also, forward slashes are expression separators. They also need to be escaped like the dots. Try some experimentation until the output reflects your intention.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.