git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Chris WedgwoodNext: Joel Becker
Message 8 of 13 in “./configure script prototype”
  1. Andreas EricssonNov 14, 2005
  2. Andreas EricssonNov 14, 2005
  3. Petr BaudisNov 14, 2005
  4. Andreas EricssonNov 14, 2005
  5. Chris WedgwoodNov 14, 2005
  6. Andreas EricssonNov 14, 2005
  7. Chris WedgwoodNov 14, 2005
  8. Fernando J. PeredaNov 14, 2005
  9. Joel BeckerNov 14, 2005
  10. Linus TorvaldsNov 14, 2005
  11. Joel BeckerNov 14, 2005
  12. Andreas EricssonNov 14, 2005
  13. Junio C HamanoNov 14, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.