I want to use node.js to capture the output of a shell so that I can send it to another process, and also send input to the shell as if I was a user using the terminal (this is for an automation tool). I have managed to accomplish the latter (sending commands and input to the shell), but I am still missing some of the output from the terminal.
I have posted a specific question here on this problem, but I'm wondering if there is a better way to accomplish the high-level goal. Maybe a node.js script isn't the correct approach. Are there better tools or existing APIs for doing what I want?