Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Exec command escapes quotes

Closed / Invalid218422ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:57:25
OriginalBugID: 5825 Bug
Version: 8.3.1
SubmitDate: '2000-06-06'
LastModified: '2000-06-06'
Severity: SER
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: All Windows
Machine: Windows NT SP5, 6a, Win2000
FixedDate: '2000-10-25'
ClosedDate: '2000-06-06'


Name:
Evan Rempel

ReproducibleScript:
The exec command escapes quotes when embedded in the sub-commands arguments.

exec cmd.exe /C echo "one" t"w"o
one t\"w\"o

exec cmd.exe /C echo {"one"} {t""w""o}
\"one\" t\"w\"o

ObservedBehavior:
This is undesirable because some command line commands require arguments to be quoted in various forms.

command "first command" name="some other data"

DesiredBehavior:
The quotes should not be escaped, 

exec cmd.exe /C echo {"one"} {t""w""o}
"one" t"w"o



This is just the visual representation, there are no physical
\'s in the text:

(tkcon) 49 % set a [exec $env(ComSpec) /c echo "one" t"w"o]
one t\"w\"o
(tkcon) 50 % string length [lindex $a 1]
5
 
-- 06/06/2000 hobbs
welch Closed ticket [218422ffff]. [History diff]2000-10-26 08:21:19
dgp Ticket [218422ffff]: 4 changes [History diff]2001-04-20 02:23:52
Log in (anonymous is fine) to add a comment.