Scenario:
I need to call an external program from my Ruby script, and this program sends a lot of useful (but cryptic) information to stdout and stderr.
While the program is running, I would like to parse the lines it sends to stdout and stderr and:
- Remove them if not necessary.
- Reformat / replace them if necessary
I tried all the usual tricks (system, exec, popen, popen3, backticks, etc. etc.), but I can only get stdout / stderr after the program is executed, and not during its execution.
Any ideas?
Oh, and I'm on Windows: - (
windows ruby
h3rald Oct 30 '09 at 13:01 2009-10-30 13:01
source share