Under Windows CMD.EXE, you would instead use double quotes ("), unless that happened to be one of the characters you wanted to pass through, in which case (IIRC) you would need to use two double quotes ("").
Actually, \" is the most common. Unfortunately, there is not one universal answer as each command can choose to interpret its command line differently (because it isn't CMD.EXE that breaks the command line into arguments and thus handles the quotes as would be the case with a Unix shell). But it seems that following how C does it has become pretty common.
See Re^2: The Evil Embedded Space (system(@list)) for more details and example implementation. One thing I failed to note in that node is that you get extra divergence in interpretation if you produce something that contains a double quote but doesn't match:
/^"( [^\\"]+ | \\+[^\\"] | (\\\\)*\\" )*"$/x
That regex may be easier to understand if I write it in a fictional version of Perl where \ is not used to escape regex meta-characters:
/^"( [^\"]+ | \+[^\"] | (\\)*\" )*"$/x
So, indeed, you can sometimes get what you desire by using doubled double quotes. One convenient way to test how C splits up arguments is:
C:\> perl -le"print for @ARGV" hi "hi" "\"hi\"" "\\hi\\" "\\hi\\\""
hi
hi
"hi"
\\hi\
\\hi\"
That lets one see how "...""..." works while how trying to include two literal quotes that way can fail:
C:\> perl -le"print for @ARGV" "6""5'"
6"5'
C:\> perl -le"print for @ARGV" "say ""hello"" to my little friend"
say "hello
to
my
little
friend
|