Stephane Chazelas <[email protected]> wrote, on 06 Jun 2019: > > 2019-06-06 15:59:33 +0000, Austin Group Bug Tracker: > [...] > > Change:<blockquote>The argument <i>text</i> shall consist of one or more > > lines. Each embedded <newline> in the text shall be preceded by a > > <backslash>. Other <backslash> characters in text shall be removed, and the > > following character shall be treated > > literally.</blockquote>to:<blockquote>The argument <i>text</i> shall > > consist of one or more lines. A <backslash> in the text can be escaped with > > another <backslash>. The application shall ensure that each embedded > > <newline> (that is, those other than the terminating <newline> of the last > > line) in the text is preceded by an unescaped <backslash>. The behaviour is > > unspecified if an unescaped <backslash> is immediately followed by any > > character other than <backslash> or <newline>, or by the end of a > > <i>script</i>.</blockquote> > [...] > > Thanks for looking into that. > > Note that I had used "script_file" instead of "script" in my > proposed resolution to allow for the historical implementation > behaviour. > > IIRC, the sed script meant to be made of the concatenation of > all the script expressions and script_files. > > So with a > > sed -e expr1 -f file1 -e expr2 -f file2 > > sed is meant to interpret the: > > expr1 > content-of-file1 > expr2 > content-of-file2 > > "script". > > However, that doesn't work in historical implementations where: > > sed -e 'a\' -e 'text' > > doesn't work the same way as: > > sed 'a\ > text' > > Is that to say that the approved resolution considers the > historical behaviour as non-conforming (I'm fine with that, I > would also consider it as a bug)?
Yes. The current text in the last paragraph of OPTIONS was a deliberate clarification (in SUSv4 TC1) which confirmed that the historical behaviour you refer to is non-conforming. > If so, is the conformance suite being updated to check for that? The tests were updated when the test suite was aligned with TC1. Note, however, that the new stricter tests are only run when testing conformance to UNIX V7. So the only system so far that is certified to meet those requirements is Solaris 11.4. -- Geoff Clare <[email protected]> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England
