How to implement a stdin, stdout wrapper?

前端 未结 4 2174
挽巷
挽巷 2021-02-10 10:57

I have an interactive program that runs stdin and stdout. I need to create wrapper that will send X to it\'s stdin, check that it prints Y and then redirects wrapper\'s stdin an

4条回答
  •  星月不相逢
    2021-02-10 11:36

    Expect is made for automating the running of other programs - essentially you write something like, in plain text,

    Start this program. When it prints out the word "username", send it my username. When it sends "password", send it my password.

    It's really great for driving other programs.

提交回复
热议问题