[Techtalk] Question: sed s option in a shell script

namik.dala at web.de namik.dala at web.de
Wed Mar 16 01:53:20 EST 2005


On Tue, Mar 15, 2005 at 09:23:04AM +0000, Dan wrote:
> lame shouldn't see the curly brackets. The "${FILE%.wav}" expands to the 
> same thing as $FILE, minus the the ".wav" at the end. However, it only 
> works in bash.

No, it works at least in every SUSv3 compatible shell.
For example in the following shells (well, I don't know, if they
are really fully SUSv3 compatible, but they know
${parameter%pattern}): bash, zsh, ksh88, ksh93, FreeBSDs /bin/sh,
Solaris' /usr/xpg4/bin/sh ...

/NM


More information about the Techtalk mailing list