Linux makes things hard… and easy.

Problem:  Need to consolidate the .mp3’s from my current playlist into 1 directory

Solution:

  1. Open .m3u file in your favorite text editor
  2. add \ before all special characters
  3. run ‘[esc] :%g/#EXTINF/d’ on the file in vim to strip out the #EXTINF lines
  4. add a dose of #! /bin/sh to the top of the file for good measure
  5. chmod +x
  6. 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.

Technorati Tags: ,

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus