求助 如何在linux下 自动程序 并且用脚本控制该程序
-
- 帖子: 5
- 注册时间: 2013-03-15 16:40
- 系统: WIN7 64位
求助 如何在linux下 自动程序 并且用脚本控制该程序
发的时候 显示页面错误 不知道为什么 发成这样了 移步 二楼 谢谢
上次由 ken2010aa 在 2013-07-27 11:00,总共编辑 2 次。
-
- 帖子: 5
- 注册时间: 2013-03-15 16:40
- 系统: WIN7 64位
求助 如何在linux下 自动程序 并且用脚本控制该程序
如题 我想在linux下自启动一个应用程序,并且在程序中输入对应的命令 例如 “load file ...”“start”等。该软件是在终端下运行的。该程序是开源的 请问我可以直接用脚本 同时 实现该程序的自启动 并且控制该程序吗? 具体步骤是?还是只能改程序的源代码 ?以前没接触过shell 请各位大神不吝赐教 谢谢~ 程序运行如附件图
-
- 帖子: 5
- 注册时间: 2013-03-15 16:40
- 系统: WIN7 64位
-
- 帖子: 5
- 注册时间: 2013-03-15 16:40
- 系统: WIN7 64位
求助 如何在linux下 自动程序 并且用脚本控制该程序
请看 二楼 谢谢
- zhw2101024
- 帖子: 1849
- 注册时间: 2009-03-28 16:10
- 系统: Arch debian win7
- 联系:
Re: 求助 如何在linux下 自动程序 并且用脚本控制该程序
如果程序自己有自动执行命令的机制的话就很容易,直接看文档。
否则的话除非程序能支持dbus。
否则的话除非程序能支持dbus。
为什么我的问题总是没有人回答?
金钱、责任与荣誉:OpenSSL主席谈心脏出血
拥有丰富API接口和广泛程序支持的dropbox云同步,点此注册,开始就比别人多500兆,我的空间也会增加。谢啦
==========我的作品==========
我做的一个面向开发者的gnome-shell扩展,有js基础又想自己调整gnome-shell功能的可以尝试一下
gnome-shell扩展开发入门,gnome-shell扩展系统扫盲帖
金钱、责任与荣誉:OpenSSL主席谈心脏出血
拥有丰富API接口和广泛程序支持的dropbox云同步,点此注册,开始就比别人多500兆,我的空间也会增加。谢啦
==========我的作品==========
我做的一个面向开发者的gnome-shell扩展,有js基础又想自己调整gnome-shell功能的可以尝试一下
gnome-shell扩展开发入门,gnome-shell扩展系统扫盲帖
-
- 帖子: 5
- 注册时间: 2013-03-15 16:40
- 系统: WIN7 64位
Re: 求助 如何在linux下 自动程序 并且用脚本控制该程序
谢谢回复 请问什么是自动执行命令的机制 在程序中是这样的命令 在文档上只说了一点zhw2101024 写了:如果程序自己有自动执行命令的机制的话就很容易,直接看文档。
否则的话除非程序能支持dbus。
- dukelec
- 帖子: 410
- 注册时间: 2010-08-26 22:20
- 系统: Gentoo
- 来自: Canton
Re: 求助 如何在linux下 自动程序 并且用脚本控制该程序
You can using "screen" to do this.
First start an screen in shell script, then send commands as string to it,
you can simulate every thing like interact with the real terminal,
and you can see the outputs by check into the screen environment.
ref: http://stackoverflow.com/questions/6534 ... it-so-that
First start an screen in shell script, then send commands as string to it,
you can simulate every thing like interact with the real terminal,
and you can see the outputs by check into the screen environment.
ref: http://stackoverflow.com/questions/6534 ... it-so-that
- lilydjwg
- 论坛版主
- 帖子: 4258
- 注册时间: 2009-04-11 23:46
- 系统: Arch Linux
- 联系:
Re: 求助 如何在linux下 自动程序 并且用脚本控制该程序
tmux 也可以。
不过,如果那个程序不挑剔 tty / pty 的话:
[bash]
your_program <<CMD
load file xxx
start
CMD
[/bash]
不过,如果那个程序不挑剔 tty / pty 的话:
[bash]
your_program <<CMD
load file xxx
start
CMD
[/bash]
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙