I am running on Windows 7.
I have a bash script which runs fine from a Windows command prompt using "C:\Program Files\Git\git-cmd.exe" "C:\path\myBashScript.sh" 17.1
. I can see it running in a new bash window, the output looks fine and it closes. What I want to do is capture the output in a file for further processing.
I tried
"C:\Program Files\Git\git-cmd.exe" "C:\path\myBashScript.sh" 17.1 > C:\out\myBashScript.out.txt
but all I get in the output is the working folder, ie,
C:\path>
Is this possible?
Thanks
"C:\Program Files\Git\git-cmd.exe" is a frontend windows launcher. I'm surprised it takes any argument at all. You should run bash scripts using bash interpreter:
PS: I'd advise to apply redirection inside the bash script rather than in windows commandline, they are better controlled there.