LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 836|回复: 1

Replace "/r" with what ?

[复制链接]
发表于 2006-8-5 21:22:08 | 显示全部楼层 |阅读模式
There are three functions( fun1, fun2, fun3),  if I type they on prompt command line for running ,  you can run fun3 until  type "Enter" after runing fun2 since there is "/r" afer executing fun1.
So my problem is that I want to let they running automatly , so how can I handled this  
[/code]
run> fun1
run> fun2
dowload complete.... please type "enter" for continue
(fun3 can be run until you must type "enter" on prompt command line)
[/code]
At presents, I want to call they behind on backend as follow
[/code]

void Autoruning()
{
   fun1();
   fun2();
   fun3();
}
run>Autoruning   // my hope is that all of function should run nice NOT waiting or holding expect for typiong "enter" key
[code]
Thanks in advance and give your appreciation
发表于 2006-8-8 01:24:14 | 显示全部楼层
@@
LZ啊……你是说现在没有中文输入法吗?如果没有中文输入法的话我建议你还是用汉语拼音了……
1 英文语法错误:
o if I type they on prompt command line....
  是them
o I want to let they running automatly...
  同理,应该是them

2 排版错误,请正确使用
  1. 代码引用
复制代码

3 表述错误,是'\r',不是'/r'

4 步入正题
很抱歉,这么晚才步入正题……

说实话,我没怎么理解LZ的意思……-_-||
LZ是说有三个函数,还是说有三个程序?
我怎么读着像是有三个程序……

我大概按照我的理解重复一遍LZ的意思,不知道对不对:
就是说,手头有三个程序,app1 app2 app3
现在需要顺序执行这三个程序,但是在执行完app2之后,需要输入一个回车才能继续往下执行。
如果我的描述正确,那么LZ可以考虑使用脚本来依次完成这个任务。具体用什么语言就看LZ爱好了,可以是shell,可以是perl,可以是python,全凭LZ个人喜好。当然了,用C也可以,不过这种黏合剂的东西还是用脚本就可以了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表