This is more of an annoyance rather than a problem but I would very much like to understand the semantics here.
All I want to do is to run an arbitrary command on a
I noticed git-bash treats the /c argument like a C: drive:
C:\Windows\system32\cmd.exe C:/ echo test
As dbenham found double quotes are added. This echos test" for example:
cmd /c\ echo\ test
I needed the same line (script) to work in git-bash as well as Cygwin Bash. The only ways that work are
cmd /c\ echo\ test\&rem\
(note that this line needs to end in a space), and
cmd << EOC
echo test
EOC
So escape every space after the /c and add \&rem\ at the end of the line (including the trailing space), or just wrap the command in a here document.
All this probably depends on the version of git-bash and the specific commands. :-(