On 2016-09-09 10:32:10 -0400, Chet Ramey wrote: > So since the whole reason for the interpretation is that the wording was > bad and shells behaved differently, there can't be any conclusions > drawn from it. It's a defect in the standard. However... > > The text in issue 8 was supposed to capture the original intent of issue 7, > even if the text in issue 7 didn't do a good job of expressing it. If you > believe this, the construct is unspecified.
OK. But if this was a defect in the standard, shouldn't the correction (at least some minimal correction) have been done in an Issue 7 TC? > > And one also has: > > > > "For the four varieties of parameter expansion that provide for > > substring processing (see [xref to 2.6.2 Parameter Expansion]), > > within the string of characters from an enclosed "${" to the > > matching '}', the double-quotes within which the expansion occurs > > shall have no effect on the handling of any special characters." > > > > There's no unspecified behavior concerning the double quotes. > > So, what about the following? > > > > echo "${foo#'a"b'"}" > > In this case, it seems to me that the single quotes are special, [...] I cannot see in Issue 7 how they are supposed to be special here. And http://austingroupbugs.net/view.php?id=221 doesn't seem to change anything. At least, they are *not* special in dash 0.5.8-2.3 and in BusyBox v1.22.1 sh (ash): $ foo=abcdef; echo "${foo#'ab'}" abcdef but the other shells regard them as special: $ foo=abcdef; echo "${foo#'ab'}" cdef So, is this also unspecified like double quotes? Or should it be specified that they are special, in which case, dash / ash are buggy? -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)