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

Re: ./configure script prototype

From: Joel Becker <hidden>
Date: 2016-06-15 22:42:11

On Mon, Nov 14, 2005 at 10:39:26AM -0800, Linus Torvalds wrote:
quoted
	${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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help