Command line processing in dcrt0.cc does not match Microsoft parsing rules
Andrey Repin
anrdaemon@yandex.ru
Sat Sep 7 12:20:00 GMT 2019
Greetings, Stephen Provine!
> On 2019-09-04 23:29, Brian Inglis wrote:
>> As standard on Unix systems, just add another level of quoting for each level of
>> interpretation, as bash will process that command line, then bash will process
>> the script command line.
> My mistake - I'm very aware of the quoting rules, yet in my test script for this
> scenario I forgot to quote the arguments. However, if POSIX rules are being
> implemented, there is still something I didn't expect. Here's my bash script:
> #!/bin/bash
> echo "$1"
> echo "$2"
> echo "$3"
> And I invoke it like this from a Windows command prompt:
> C:\> bash -x script.sh foo bar\"baz bat
> + echo foo
> foo
> + echo 'bar\baz bat'
> bar\baz bat
> + echo ''
> Not expected. Called from within Cygwin, the behavior is correct:
Again, fully expected.
> $ bash -x script.sh foo bar\"baz bat
> + echo foo
> foo
> + echo 'bar"baz'
> bar"baz
> + echo bat
> bat
> Can you explain this difference?
CMD escape character is ^, not \
> The reason I ask is that if this worked,
> the way Go constructs the command line string would be just fine.
No.
--
With best regards,
Andrey Repin
Friday, September 6, 2019 23:33:46
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list