I'm trying to run the following from my bash script. (bash installed via msysgit)
taskkill /IM ssh-agent.exe
The output I get on the screen from taskkill
is:
ERROR: Invalid argument/option - 'C:/Program Files/Git/IM'.
Type "TASKKILL /?" for usage.
The executible is running, but the /IM
is being expanded regardless of what I try to do to escape it...
I've tried using \/IM
but then it sends \/IM
without escaping the slash, I've tried a few different ways of running it through eval, cmd /c start, etc... but they all seem to have issues. I've also tried set -o noglob
, which also didn't work. neither did $'\057/'IM
or similar attempts...
.\SomeExecutable.exe "/foo"
SomeExecutable
is running fine, it's the fact that the parameter coming intoSomeExecutable
is/some/path/to/foo
instead of just/foo