Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: building m3u-playlists from bash in unix

Re: building m3u-playlists from bash in unix

From: <Gajdos_at_metatem.net>
Date: Thu, 2 Oct 2003 10:12:01 +0200 (CEST)

You can pipe it through 'sed' - it's got a nice search/replace function:
find ~/Music/ -type f -name \*.mp3 | sed 's/Users\/svante\/Music/A-C/' >playlist.m3u

(the '/' acts as a separator in 's/search-for/replace-with/', so it has to
be escaped with '\' in the actual search string.)
/JG


On Thu, 2 Oct 2003 at 08:50, svante t wrote:

> Hey all,
> I have a slight *nix-problem I want some help with, a little bit off
> topic maybe...
> I learned how to make m3u-playlists straight from my prompt by using this:
>
> find ~/Music/* -type f -name '*.mp3' > ~/Music/Playlist.m3u
>
> Now, the problem is that I dont always mirror my files locally
> exactly like on my archos. So how do I modify the above to put in
> another path than the output? More exactly, how do I change the
> output from /Users/svante/Music/Artist/Track.mp3 to
> /A-C/Artist/Track.mp3
>
> There is probably some supersmart command to put in between the two
> commands above, and I want to know how. Any wizard out there who can
> guide me?
>
> /Svante
Received on 2003-10-02

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy