|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0768 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0768.
Report 0768 Actions
Problem Report Number 0768 Submitter's Classification Specification problem State Resolved Resolution Temporary Interpretation (TIN) Problem Resolution ID TIN.X.0059 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1995-08-09 08:00 Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 4.1.4 Test Identification POSIX.shell/shell 399 Specification Commands and Utilities Issue 4 Version 2 Location in Spec See Problem Text Problem Summary TIN4C.00002 test fails improperly if implementation does not treat \" as " in unquoted here-documents Problem Text
How the shell should treat a '\\' (backslash) in a here-document when
no characters in word (here-document delimiter) are quoted was recently
the subject of a PASC interpretation (PASC 1003.2-92 #102) with
the final resolution being the standard was unclear on the matter
and was being forwarded to the sponsor.Test Output
Assertion #399 (A): When no character in 'word' is quoted, then a backslash retains its
Note: there is an active POSIX.2 interpretation request
regarding the correct behavior as specified by this
assertion.
Standard output isn't the same as file 'test.399.exp'
diff of "out.stdout" and "test.399.exp":
*** out.stdout Wed Aug 2 13:39:56 1995
--- test.399.exp Wed Aug 2 13:39:54 1995
***************
*** 1,3 ****
line one
line two
! \"test\".${TESTID}.\'pwd\'\xline four
--- 1,3 ----
line one
line two
! "test".${TESTID}.\'pwd\'xline four
Assertion Result: FAIL
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
pasc-1003.2-102 states
In the description of shell "here-documents" in POSIX.2 subclause 3.7.4,
the standard states in part:
If no characters in word [the here-document delimiter] are
quoted, all lines of the here-document shall be expanded for
parameter expansion, command substitution and arithmetic
expansion. In this case, the backslash in the input will
behave as the backslash inside double-quotes (see 3.2.3).
However, the double-quote character (") will not be treated
specially within a here-document, except when the double-quote
appears within $( ), ` ` or ${ }.
The reference to section 3.2.3 refers (I believe) to the following text:
The backslash shall retain its special meaning as an escape
character (see 3.2.1) only when followed by one of the characters
$ ` " \ <newline>
If the here-document delimiter has not been quoted then does section 3.7.4
modify section 3.2.1 such that backslash is NOT an escape character when
followed by the double-quote character? That is, does the "However" clause
mean that '\"' should not be replaced with '"'? For example, consider the
here-document:
cat << EOF
x\"y\"z
EOF
The output of this here-document may be either
x"y"z
or
x\"y\"z
depending on how one reads the specification.
Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can
be made between alternative implementations based on this. This is being
referred to the sponsor.
Anticipating future alignment of the POSIX 2003.2 method(s)
which the test(s) listed are based on with this interpretation
a Temporary Interpretation is recommended.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Temporary Interpretation (TIN) Review Conclusion
A Temporary Interpretation is granted.
Problem Reporting System Options:
- View Report 0768
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority