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

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 
  * The string within quotation marks is the name of an executable

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.


Unsubscribe info:
Problem reports:

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