LinuxSir.cn,穿越时空的Linuxsir!

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

Replace "/r" with what ?

[复制链接]
发表于 2006-8-5 21:22:00 | 显示全部楼层 |阅读模式
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  

  1. run> fun1
  2. run> fun2
  3. dowload complete.... please type "enter" for continue
  4. (fun3 can be run until you must type "enter" on prompt command line)
复制代码

At presents, I want to call they behind on backend as follow

  1. void Autoruning()
  2. {
  3.    fun1();
  4.    fun2();
  5.    fun3();
  6. }

  7. run>Autoruning   // my hope is that all of function should run nice NOT waiting or holding expect for typiong "enter" key
复制代码

Thanks in advance and give your appreciation
发表于 2006-8-6 09:30:53 | 显示全部楼层
1. 英文错误一大堆,如果少于 5 个,我就去跳楼......

2. 什么叫 "/r" 你想说 "\r" ???

3. 根本就不知道你想问些什么
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-6 14:16:54 | 显示全部楼层
Owe ! thanks your so critical comment, frnakly speaking, give your a great appreciation from my the deepest hart bottom. you are so friendly, kindly, and passionly, I know that my expresion is so pool ,shortly,  I have no chioce but to do this beause I am in Linux/FecordCore without chinese lanauage.


My question is that

  1. run>fun1
  2. run>fun2
  3. Dowload complete... please type "enter" for continue
  4. (enter)
  5. run>fun3
复制代码

so forth, I want to do like follow

  1. # vi Automation
  2. call fun1();
  3. call fun2();
  4. call fun3();
  5. #
  6. run>Automation
  7. (I hope the results is that all of these three functions should run nice WITHOUT anybody to  interven)
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-8-6 14:57:24 | 显示全部楼层
老兄,没有任何中文字体和中文输入法也可以用GNU EMACS打出中文。老大你的英文看不懂啊!
回复 支持 反对

使用道具 举报

发表于 2006-8-6 15:31:41 | 显示全部楼层
你在fun2中执行了什么?如果可以,把fun2发出来看看。

有在线中文输入法在 http://www.linuxsir.cn/bbs/showthread.php?t=223185
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-8-7 20:22:25 | 显示全部楼层
向各位致歉如此瞥脚的e文。
有三个函数做成的命令

  1. function1()   -- > command1;
  2. function2()   -- > command2;
  3. function3()  --  > command3
  4. 在命令行上顺序执行:
  5. run>command1   //回车
  6. run>command2   //回车
  7. Dowload complete... please type "enter" for continue
  8. 如果要执行第三个命令,必须敲回车才行。
复制代码

现在我的问题是

  1. vi Automation
  2. call function1();
  3. call function2();
  4. call function3();

  5. 将这个三个函数做成一个命令command, 然后在命令行上运行,希望一起执行,不再人为的去敲回车键
  6. run>command
  7. 三个命令都很好的执行。
复制代码

就是如何在执行第三个命令前去掉第二个命令后的回车键"\r"。谢谢!
回复 支持 反对

使用道具 举报

发表于 2006-8-8 01:28:55 | 显示全部楼层
……
居然一帖多发……那就表怪我发拉圾帖子了,你的问题我已经回复了:
http://www.linuxsir.cn/bbs/showthread.php?t=266897
以后最好不要一帖多发了……
回复 支持 反对

使用道具 举报

发表于 2006-8-8 09:08:12 | 显示全部楼层
那是command2的问题,它需要一个确认。查看一下command2的文档,看是否有不需要确认的运行方式。如果没有,就认了吧。或者你修改command2的源码。

不过到目前为止,我还是不知道楼主说的/r(\r)是什么意思。
回复 支持 反对

使用道具 举报

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

本版积分规则

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