From: Jenda Krynicky Date: 2007-03-03T04:00:50+09:00 Subject: Re: Ruby Noob: Using stderr, stdout, etc reed.adam@gmail.com wrote: > Thanks for the explanation Tim, that's exactly what I needed. I > didn't realize they would act differently under windows/unix - I think > I was stuck on imagining them as code-specific items because I wasn't > used to hearing about them in unix. > > Strangely enough, I'm ok as far as unix and pipe/redirection, and I've > been logging output of standard unix stuff to files for a couple of > years - just never knew specifically what the output was called. Go > figure. The thing to watch out for under Windows is that (at least on some versions) script.rb > results.txt doesn't work and you have to write ruby script.rb > results.txt This is caused by the fact that the cmd.exe has to use a different WIN32 API call to execute the script using the file extension mapping than what it would use for .exe and thatthe former doesn't preserve the STDxxx redirection. -- Posted via http://www.ruby-forum.com/.