Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何开放源代码库或标准函数允许 C 程序与其他命令行程序交互(例如可能请求用户输入)。
expect是一个流行的库,用于以编程方式与交互式程序(例如ssh)进行交互。它有一个被称为 C 的端口,它libexpect可以做你想做的事。expect模拟终端,因此对于不会与简单管道通信的应用程序特别有用。
expect
ssh
libexpect