#!/bin/bash # # (c) 2009 James Ogley http://jamesthevicar.com # Convert playlists writted by Banshee (and probably other Linux # music players) to format understood by Cowon S9. # # Before using, make sure you're in the directory containing the .m3u files. # # Usage: /path/to/cowons9playlistconverter # # Version 0.1 2009-07-17 Initial hack # Version 0.2 2009-07-17 Only convert slashes in file names # # IF a line begind with a letter, prepend a slash /usr/bin/sed -i '/^[A-Z a-z]/ s?^?/?' *.m3u # Convert all UNIX slashes to DOS backslashes in lines beginning with slash /usr/bin/sed -i '/^\// s/\//\\/g' *.m3u # Convert to DOS file-endings /usr/bin/unix2dos -q *.m3u