command line rock

curl http://barsukmusic.blaireau.net/player/bark067/bark067.xspf | grep "<location" | perl -ple "s/<.*?>//igx" | xargs curl -O

Thanks for the heads-up, G/Catherine.

Comments

Nice. My own recipe for this was longer and not as clean.

I reposted this to the XSPF list at http://lists.musicbrainz.org/mailman/listinfo/playlist

 

That's nice of you, Lucas -- thanks! I bet that your solution is better, though. As I recall you once sent me an XSLT-based method. Mine relies on the presence of line breaks between each <location> tag, which is usually the case but probably shouldn't be counted on. This does make a tidier one-liner, though.

 

Post a comment