in reply to Re^4: win32 parenthesis system weirdness
in thread win32 parenthesis system weirdness
'(' and ')' are special characters. They are used grouping commands like:
>(md x && cd x) || (echo "Couldn't create x" & exit)
The rules for how cmd.exe treats quotes (usefully provided by help cmd), are as follows:
If /C or /K is specified, then the remainder of the command line after the switch is processed as a command line, where the following logic i +s used to process quote (") characters: 1. If all of the following conditions are met, then quote charact +ers on the command line are preserved: - no /S switch - exactly two quote characters - no special characters between the two quote characters, where special is one of: &<>()@^| - there are one or more whitespace characters between the two quote characters - the string between the two quote characters is the name of an executable file. 2. Otherwise, old behavior is to see if the first character is a quote character and if so, strip the leading character and remove the last quote character on the command line, preservin +g any text after the last quote character. ... The special characters that require quotes are: <space> &()[]{}^=;!'+,`~
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: win32 parenthesis system weirdness
by ldln (Pilgrim) on Dec 04, 2009 at 12:03 UTC |