亦幻 发表于 2009-2-23 20:27:53

关于一交互的难题

现在我有一小程序upnet,是学校的拨号器,如下运行
$ ./upnet
select server:
1. servicename
please select(e-Exit):1#这时候按1回车就可以了
The attestation is successful, you can be then now internet access!
但我想用shell来自动运行,应该怎么做,就是模仿键盘敲上个1~,已经知道没有参数可以加了

亦幻 发表于 2009-2-24 22:22:49

用 except的话,完后会把进程给kill了,但我要保持他的进程
页: [1]
查看完整版本: 关于一交互的难题