Linux makes things hard… and easy.
Monday, July 14th, 2008Problem: Need to consolidate the .mp3’s from my current playlist into 1 directory
Solution:
- Open .m3u file in your favorite text editor
- add \ before all special characters
- run ‘[esc] :%g/#EXTINF/d’ on the file in vim to strip out the #EXTINF lines
- add a dose of #! /bin/sh to the top of the file for good measure
- chmod +x
- run
If I had only known it was that simple an hour ago…
Google failed me because I didn’t find the ‘%g/string/d’ command the first time I searched for how to do the replace, but instead found all the info I could find on the ’sed’ command, which apparently requires you to have a computer engineering degree to figure out how to use.


