Hi all,
I have a small question. As you may have noticed, the last version of
Practical Ruby allow the user to run a script.
The current implementation use the backquote:
output = `#{command} 2>&1` # redirect stderr to stdout for
capture
where command is of the form:
"ruby -I #{directory} #{scriptName}"
while this work, it does not allow to print each line of the output to
the console window as soon as it is available. How does one do that ? My
guess is that it probably invole pipe, but I have no programming experience
with those (and even less in ruby).