Subject: Re: ./configure script prototype

From: "Fernando J. Pereda" <[email-masked]>
Date: Mon, 14 Nov 2005 17:32:40 +0100

On Mon, Nov 14, 2005 at 02:29:56PM +0100, Petr Baudis wrote:
| Dear diary, on Mon, Nov 14, 2005 at 01:18:52PM CET, I got a letter
| where Andreas Ericsson <[email-masked]> said that...
| > 		--prefix=*)
| > 			prefix=${1##*=}
| 
| Aren't those heavy bashisms?

As far as I know, it should be supported by a POSIX 'sh'[1]:

---8<---
${parameter##word}

Remove Largest Prefix Pattern. The word shall be expanded to produce a
pattern. The parameter expansion shall then result in parameter, with
the largest portion of the prefix matched by the pattern deleted.
---8<---

Whether other shells support it or not... I don't know.

Cheers,
Ferdy

[1] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

-- 
Fernando J. Pereda Garcimartin
Gentoo Developer (Alpha,net-mail,mutt,git)
20BB BDC3 761A 4781 E6ED  ED0B 0A48 5B0C 60BD 28D4