burning MP3 blues

Chris F.A. Johnson c.f.a.johnson-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Fri May 14 18:34:42 UTC 2004


On Fri, 14 May 2004, JoeHill wrote:

> On Thu, 13 May 2004 22:05:43 -0700 (PDT)
> Mel Seder disseminated the following:
>
> > Can anyone give me a command line for burning mp3's in /tmp/burn/ to a CDR
> > using cdrecord with parameters?
>
> add these to you .bashrc:
>
> function mp3dec() { for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav;
> done; }
>
> function mp3ren() { for i in *.mp3; do mv "$i" `echo $i | tr ' ' '_'`;done; }
>
> (both are all one line)

    It's much better to use multiple lines; it's easier to read and to
    modify.

    And there's no need for the external commands basename and tr:

mp3dec() {
   for i in *.mp3
   do
     lame --decode "$i" "${i%.mp3}.wav"
   done
}

mp3ren() {
   for i in *.mp3
   do
      mv "$i" "${i// /_}"
   done
}


-- 
	Chris F.A. Johnson                      http://cfaj.freeshell.org
	=================================================================
                Everything in moderation -- including moderation
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list