views:

104

answers:

1

Folks, I'm using git tools such as git bisect run which need to call a command to build and test my project. My command to do is nant which is a windows program. Or a build.cmd script which calls nant.

It's easy to get the bash to call the nant build to run.

But the hard part is how to get the standard output written to a file?

I even installed the Windows PowerShell to try running a command from bash.

Again, it works but the standard output fill says "permission denied" when I try to read it while the build is going on.

Update:

When running nant, the entire path is used. It is installed and runs fine. The problem is how to get the standard output when running from bash.

If running nant from the windows prompt with "> build.out" at the end of the line, you will get the standard out. But the same never works under bash. It just says build.out is locked, permissions denied.

+1  A: 

(If I am understanding your question correctly...)

You can probably use the 'tee' command to split the output to both a file and stdout. The line echo I am building something | tee build.out will both print the output on the console and save it to the file named "build.out".

The tee command is usually available in Cygwin, and also apparently in the Bash shell installed by msysgit (where I just tested it). Here's a good reference page for more details.

ewall