help with sed

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Sat Jun 16 04:38:37 UTC 2007


On Sat, 16 Jun 2007, Sy Ali wrote:

> In Konqueror, I can right-click a wav file and I see an action to encode it.
>
> But I notice that it won't work with some filenames.  I tracked down
> the commandline being used, and I see that sed is removing .wav from
> the end of the input thusly:
>
> lame %f `echo %f | sed 's/\\\\\\\\.wav$$//'`.mp3
>
> But this won't work on complex filenames, such as:
>
> Lacuna Coil [2005, in a Reverie (reissue) #03] - Honeymoon Suite.wav
>
> What can I do to correct this commandline and keep using sed to remove
> ..wav from the end of the filename?

lame %f `echo %f | sed 's/.wav$//'`.mp3

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ========= Do not reply to the From: address; use Reply-To: ========
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list