help with sed
Chris F.A. Johnson
cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Sat Jun 16 15:13:59 UTC 2007
On Sat, 16 Jun 2007, Peter P. wrote:
> Chris F.A. Johnson <cfaj at ...> writes:
>
>> lame %f `echo %f | sed 's/.wav$//'`.mp3
>
> '%f' suggests this runs under Win32 ? Or csh ? In bash:
>
> lame "$f" "${f%%.wav}.mp3"
>
> (somehow I had expected you (CFAJ) to write this ;-)
I didn't, because it was not clear whether it was being processed
by a shell, and if not, sed is much more efficient than invoking a
shell just to perform parameter expansion.
--
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