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

Re: ./configure script prototype

From
JBJoel Becker <joel.becker@oracle.com>
Date
Nov 14, 2005, 18:59 UTC
Message-ID
<20051114185949.GE20749@ca-server1.us.oracle.com>
In-Reply-To
<Pine.LNX.4.64.0511141027380.3263@g5.osdl.org>
On Mon, Nov 14, 2005 at 10:39:26AM -0800, Linus Torvalds wrote:
> > 	${i# and ${i% are POSIX, iirc.
> 
> They may be in POSIX, but they sure as h*ll aren't portable.
	By POSIX I meant POSIX shell, which is ksh.  That's available on
just about all modern non-free Unices, and we all know bash and zsh are
compatible with it.
	But I had no intention of arguing how portable POSIX is, I was
just trying to describe the minimum breadth of support.  My personal
experience is that these particular variable forms have worked on Linux,
Solaris, AIX, Ultrix, IRIX, and the BSDs for, I dunno, eight to ten
years or so.
	That said, $(echo | sed), or `echo | sed` for even more
backwards portability (I bet $() is about as portable as ${i%}), can be
used to replace the ${i%} forms.
Joel
-- 
"I always thought the hardest questions were those I could not answer.
 Now I know they are the ones I can never ask."
			- Charlie Watkins

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
Previous: Linus TorvaldsNext: Andreas Ericsson
Message 11 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.