Subject: Re: ./configure script prototype

From: Joel Becker <[email-masked]>
Date: Mon, 14 Nov 2005 10:59:49 -0800

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: [email-masked]
Phone: (650) 506-8127