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

后端 未结 7 1442

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:09

    For script independent output logging you might want to enable it from the terminal emulator (shell container). screen -L OR xterm -l This will capture all output produced by any shell or program running inside the emulator, including output generated by your ruby scripts.

提交回复
热议问题