This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sed: altered results in bash and cmd


Markus Schönhaber wrote:

> The difference in behaviour you are seeing results from the difference
> in the way cmd and bash interpret command lines and pass the resulting
> arguments to the specified commands.

You can read the specifics of how cmd.exe handles quoting at
<http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_o.mspx>,
specifically:

""
If you specify /c or /k, cmd processes the remainder of string and
quotation marks are preserved only if all of the following conditions
are met:
  * You do not use /s.
  * You use exactly one set of quotation marks.
  * You do not use any special characters within the quotation marks
    (for example: &<>( ) @ ^ |).
  * You use one or more white-space characters within the quotation 
    marks.
  * The string within quotation marks is the name of an executable
    file.

If the previous conditions are not met, string is processed by examining
the first character to verify whether or not it is an opening quotation
mark. If the first character is an opening quotation mark, it is
stripped along with the closing quotation mark. Any text following the
closing quotation marks is preserved.
""

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]