On Sun, 20 Mar 2005 18:48:59 -0600
Mikkel L. Ellertson disseminated the following:
> > # mp3 functions
> > function mp3ren() { for i in *.mp3; do mv "$i" `echo $i | tr ' '
> > '_'`;done; }
> >
> > function mp3dec() { for i in *.mp3; do lame --decode $i `basename $i
> > .mp3`.wav;
> > done; }
> >
> > First one removes spaces in the filenames and converts to LC, second
> > converts to
> > WAV.
> >
> > Watch the line-wrap and the back-ticks :-)
> >
> >
> Wouldn't something like:
>
> function mp3dec() { for i in *.mp3 ;
> do lame --decode "$i" "`basename \"$i\" .mp3`.wav" ;
> done; }
>
> handle names with spaces in them?
Oh, probably. You would know better than I. I copied these bits of code from the
Deadman.org site IIRC. Personally, I like my MP3 files to be renamed anyhow, for
future CLI functions. Filenames with spaces are a pain in the arse.
--
JoeHill / RLU #282046 / www.freeyourmachine.org
20:36:09 up 27 days, 22:41, 7 users, load average: 0.15, 0.13, 0.26
+++++++++++++++++++++++++++
"We have become a Nazi monster in the eyes of the whole world - bullies and
bastards who would rather kill than live peacefully. We are whores for power and
oil with hate and fear in our hearts." -- Hunter S. Thompson
____________________________________________________
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________