Re: ./configure script prototype

From: Joel Becker <Joel.Becker@oracle.com>
Date: 2005-11-15 05:59:49
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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Tue Nov 15 06:00:38 2005

This archive was generated by hypermail 2.1.8 : 2005-11-15 06:00:45 EST