Thread (12 messages) 12 messages, 6 authors, 2016-06-15

Re: ./configure script prototype

From: Fernando J. Pereda <hidden>
Date: 2016-06-15 22:42:11

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 [off-list ref] 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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help