On 3/23/06, Padhma N <[EMAIL PROTECTED]> wrote: > (1) I would like to send the results of my test suite to a .txt file and > also want the results to be seen on the console. How do I do that? > I know that I can use the following command in the command prompt- > function1.rb > results.txt > > But I want something more like,the program itself directing its each output > to both the console and the results.txt file. > I tried f.syswrite but that seems inefficient as I have to use f.syswrite at > all places I use puts statement. Is there a better way to do this?
Using cygwin, this will give you what you want: function1.rb | tee results.txt See also http://www.mcse.ms/archive40-2004-7-914432.html for other ways to do this on Windows. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
