Thanks for your help so far guys. Is this possible to do yet be able to get the stderr as well? I'm trying to use Open3, but am having trobules to get the output as it's occurring. db On Thu, Mar 27, 2003 at 02:48:58AM +0900, Robert Klemme wrote: > maybe something like this: > > def doit(command) > IO.popen("command","r") do |io| > io.each { |line| puts line } > end > > # return status > $? > end > > robert > > "Daniel Bretoi" <lists / debonair.net> schrieb im Newsbeitrag > news:20030326165818.GC99575 / zone.syracuse.net... > > > Personally I do: > > > > > > make >make.out 2>&1 > > > > > > I need to see the output to the screen while doing it. :/ > > > > > You could write a different version of 'tee' which spawns the process > of > > > interest (ls) itself, and passes back the right return code: you'd run > it as > > > > > > teepee out ls /sldjclsc > > > > > > > I thought of that. What in ruby would enable me to print output while > > it's happening? A systemcall will let me see it. I can' twait for the > > process to finish before seing output as some of the executions can take > > hours, and there is useful output in the meantime. > > > > db > > > -- Mar 26 Benjamin Thompson born, 1753, Count Rumford; physicist Mar 26 David Packard died, 1996; age of 83 Mar 26 Popeye statue unveiled, Crystal City TX Spinach Festival, 1937 Mar 26 Independence Day in Bangladesh Mar 26 Prince Jonah Kuhio Kalanianaole Day in Hawaii Mar 26 Emerson, Lake, and Palmer record "Pictures at an Exhibition" live, 1971