On Mon, May 07, 2007 at 02:36:22AM -0400, Jeff King wrote: > > It looks like bash is actually broken in POSIXLY_CORRECT mode, then: > > $ echo $BASH_VERSION > 3.1.17(1)-release > $ POSIXLY_CORRECT=1 > $ foo=bar} > $ echo "${foo%'}'}" > bar > > My interpretation of the correct behavior is that it should remove a > single quote from the end of foo, and then print '} literally (that is, > single quote and brace). Well strictly speaking this is allowed by the standard as this usage contains an odd number of single quotes inside an ${...} expression enclosed by double quotes, which behaves in an implementation-specific manner. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html