[NTLUG:Discuss] Trivial MP3 conversion script

Robert Citek robert.citek at gmail.com
Mon Jun 9 00:11:37 CDT 2008


On Sun, Jun 8, 2008 at 11:29 PM, Rick Renshaw <bofh69 at yahoo.com> wrote:
>
> --- Daniel Hauck <daniel at yacg.com> wrote:
>> How can I take the extension off of the file list and then process like
>> this?
>>
>> ... do lame $i.[Ww][Mm][Aa] $i.mp3; done
>>
>> What magic code strips off the ".wma"?
>
> I use:
> for i in *.[Ww][Mm][Aa]; do n=`echo $i|sed 's/\.wma//'`;lame $i $n ; done

Alternatively:

for i in *.[Ww][Mm][Aa]; do
  lame $i ${i/%.???/}
done

Regards,
- Robert



More information about the Discuss mailing list