Rockbox mail archive
Subject: Re: building m3u-playlists from bash in unix
From: Gajdos_at_metatem.net
Date: 2003-10-02
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
Page was last modified "Mar 9 2008" The Rockbox Crew
|