Running a shell command from Ruby: capturing the output while displaying the output?

后端 未结 7 1434

I have a problem.

I want to run a ruby script from another ruby script and capture it\'s output information while letting it output to the screen too.

runner

7条回答
  •  隐瞒了意图╮
    2021-02-10 03:08

    Have a look at POpen4. It claims to be platform independent (but I do not think it works in jruby where you can use IO#popen instead).

提交回复
热议问题