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
>