Re: ./configure script prototype
- From
Fernando J. Pereda <ferdy@ferdyx.org>
- Date
- Nov 14, 2005, 16:32 UTC
- Message-ID
- <20051114163240.GA32445@ferdyx.org>
- In-Reply-To
- <20051114132956.GT30496@pasky.or.cz>
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 <ae@op5.se> 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