truncating file extensions

John Covici covici at ccs.covici.com
Sat May 21 10:05:05 EDT 2005


You could quote thename or use one of the many ${ ...} to get rid of
an extention.  If I remember %% gets rid of a string at the end of a
parameter.

on Thu, 19 May 2005 17:13:54 -0400 Igor Gueths <igueths at lava-net.com> wrote:

> Hi all. The subject pretty much nails it...I've been trying to find a way to truncate the ugly extensions that Lame leaves behind when batch-transcoding i.e., foo.mp3.wav. Currently, I've 
> managed to come up with the following:
> for file in *.mp3
> do
> lame --decode $file ${file/mp3/wav}
> done
>
> When I run the above, I get an error from Lame-3.96.1 about an excessive number of arguments. When I run it in a script with #!/bin/bash -x, I found that the filenames aren't being escaped as 
> they should. Anyone know how I would correct it so that it works on files with whitespace? Thanks!
> -- 
> How many chunks could checkchunk check if checkchunck could check chunks?
> -- Alan Cox
>
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
>

-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici at ccs.covici.com




More information about the Speakup mailing list