From: James Britt Date: 2004-09-22T14:17:35+09:00 Subject: Re: How to output result to text file? Bill Kelly wrote: > Hi, > > From: "nkb" > >>With ruby, I typed >>ruby mytestscript.rb > output.txt >> >>The result still prints out to the standard microsoft commandline >>console output and not to the file output.txt. How can I achieve the >>output to a text file? > > > That's odd.... Which version of windows are you running? > On my win2k box, > > ruby -e "puts 'hi'" > zz > > ...creates a file called "zz" with "hi\n" in it as expected. Is the code is writing to STDERR? The you would need ruby mytestscript.rb 2> output.txt James