View Issue Details

IDProjectCategoryView StatusLast Update
00006422008-TC1Shell and Utilitiespublic2013-04-16 13:12
Reporterrhansen Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionRejected 
Product VersionDraft 5 
NameRichard Hansen
Organization
User Reference
Section2.2.3
Page Number2320
Line Number73618
Interp Status---
Final Accepted Text
Summary0000642: "unescaped" quotes in ${...} should be "unquoted"?
DescriptionThe term "unescaped" in the following sentence is not defined:

    Within the string of characters from an enclosed "${" to the matching '}', an even number of unescaped double-quotes or single-quotes, if any, shall occur.

If "unescaped" means "not quoted by a <backslash> character", then the following is presumably allowed:
    "${PWD+\'}"
    "${PWD+\"}"
but not the following:
    "${PWD+"'"}"
    "${PWD+'"'}"
because there is an odd number of unescaped single/double quotes between the "${" and "}". I believe this interpretation of "unescaped" would result in an unintended restriction; that the intention of the standard is for:
    printf %s\\n "${PWD+"'"}"
    printf %s\\n "${PWD+'"'}"
to be legal and output:
    '
    "
Desired ActionReplace "unescaped" with "unquoted".
TagsNo tags attached.

Activities

geoffclare

2013-01-16 09:52

manager   bugnote:0001444

The restriction is intended and reflects the fact that there is
differing behaviour between existing implementations when an
odd number of unescaped double-quotes or single-quotes is used.

With /usr/xpg4/bin/sh on Solaris 10:

$ printf %s\\n "${PWD+"'"}"
> x'
""
x
$ printf %s\\n "${PWD+'"'}"
> x'
'"
x

Issue History

Date Modified Username Field Change
2013-01-16 03:46 rhansen New Issue
2013-01-16 03:46 rhansen Status New => Under Review
2013-01-16 03:46 rhansen Assigned To => ajosey
2013-01-16 03:46 rhansen Name => Richard Hansen
2013-01-16 03:46 rhansen Section => 2.2.3
2013-01-16 03:46 rhansen Page Number => 2320
2013-01-16 03:46 rhansen Line Number => 73618
2013-01-16 09:52 geoffclare Note Added: 0001444
2013-01-17 16:47 msbrown Interp Status => ---
2013-01-17 16:47 msbrown Status Under Review => Resolved
2013-01-17 16:47 msbrown Resolution Open => Rejected
2013-04-16 13:12 ajosey Status Resolved => Closed