From: coma_killen@... Date: 2002-09-18T16:10:20+09:00 Subject: Capturing stdout from cmd while letting it print it Hi, I want to capture the output from a program but still have it print to STDOUT. I tried r = [] IO.popen("mycmd") do |pipe| while (line = pipe.gets) r << line STDOUT.puts line end end but the output will only come after the command has finished running. This doesn't work here since the command runs for very long and the user will want the output. Is there a pure-Ruby way (that works on Windows!) for capturing the output of a command without "disturbing" its normal output to STDOUT? Sorry if this is very basic but I have a windows background... ;-) Regards, Karsten