|
zerocq
中级用户
  
积分 458
发帖 196
注册 2006-10-5
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
Originally posted by yangzhiyi at 2006-10-29 01:02:
狂,批命令分步执行的还需用到延时,通常都是用转跳吧,用ping -n 1 127.1>nul 来延时更狂。
有些命令得到结果比较慢,偏偏下一步要用到结果的话要延时一下再运行下一步
不可能不停跳转跳来跳去吧o.o
Originally posted by yangzhiyi at 2006-10-29 01:02:
Crazy, for batch commands that need to be executed step by step and also require delays, usually jumps are used. Using ping -n 1 127.1>nul for delays is even crazier.
Some commands take a relatively long time to get results, and if the next step needs to use the results, you need to delay for a while before running the next step
It's impossible to keep jumping around all the time o.o
|
|
2006-10-29 01:13 |
|
|
zhwvip
初级用户
 
积分 29
发帖 14
注册 2006-8-2
状态 离线
|
『第 17 楼』:
使用 LLM 解释/回答一下
Originally posted by zerocq at 2006-10-29 01:13:
有些命令得到结果比较慢,偏偏下一步要用到结果的话要延时一下再运行下一步
不可能不停跳转跳来跳去吧o.o
一般可以 start /w来解决等待结果的情况把?
Originally posted by zerocq at 2006-10-29 01:13:
Some commands take a long time to get results. If the next step needs to use the results, you need to delay for a while before running the next step
It's impossible to keep jumping around o.o
Generally, can start /w be used to solve the situation of waiting for results?
|
|
2006-10-29 01:26 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
一般可以 start /w来解决等待结果的情况把?
用 start 命令会重新开一个CMD窗口或者其它的程序窗口,这样在某些情况下面是不合适的。
而在很多情况下,用 ping 命令可以起到一定的效果,而且时间可以随意由你设定,虽然精确度不是很好。在批处理中,还是有很多地方用到 ping 命令来达到延时的目的的。
Usually, can starting with start /w solve the situation of waiting for the result?
Using the start command will open a new CMD window or other program windows, which is not appropriate in some cases.
And in many cases, using the ping command can play a certain role, and the time can be set arbitrarily by you, although the accuracy is not very good. In batch processing, the ping command is still used in many places to achieve the purpose of delay.
|
|
2006-10-29 02:33 |
|
|
wjdbar
新手上路

积分 6
发帖 3
注册 2006-10-28
状态 离线
|
|
2006-10-29 03:23 |
|
|
yangzhiyi
中级用户
  
积分 261
发帖 123
注册 2006-6-6
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
如果在批命令中 跟本不需要延时
结果比较慢,偏偏下一步要用到结果 ???这步未执行完就不会到下一步,如果这步完成了,下一步也有结果可用了,DOS命令只有一个指针的啊,
如果在批处理中调用了其它程序或文件,start /w 就行,没有什么新窗口问题的。
我只知道用 choice 延时后自动输入值,
这个延时我真不知道怎么应用。
如果想多个批处理同时运行,所得的结果需要相互使用,这像的应用应该是错误的,难道这就是DOS下的多线程。
If in the batch command, there is no need for delay at all. The result is relatively slow, but the next step偏偏 needs to use the result. The next step will not be reached until this step is not completed. If this step is completed, the next step also has the result available. DOS commands have only one pointer.
If other programs or files are called in the batch processing, start /w will do, and there is no problem of a new window.
I only know that choice is used to delay and then automatically input the value,
I really don't know how to apply this delay.
If you want multiple batch processes to run simultaneously, and the obtained results need to be used by each other, this kind of application should be wrong. Could this be multi-threading under DOS.
|
|
2006-10-29 03:30 |
|
|
tianzizhi
高级用户
   
积分 622
发帖 214
注册 2006-9-22
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
choice 延时 : choice /t 120 /d y
延时单位为秒,上面即延时 120秒.
choice delay : choice /t 120 /d y
The delay unit is seconds, and the above is a delay of 120 seconds.
|
|
2006-10-29 04:06 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
如果一个命令执行得比较慢,而下一个命令要利用这个命令的结果,那么可以利用一下命令连接符"&&"和"||",比如:"command 1 && command 2 || command",这样,如果command 1执行成功之后,才执行command 2,如果不执行不成功的话,就执行command 3,也可以理解成command 2只有在command 1执行成功之后才执行。
If a command executes relatively slowly and the next command needs to use the result of this command, you can use the command connectors "&&" and "||". For example: "command 1 && command 2 || command". In this way, if command 1 is executed successfully, command 2 is executed. If it is not executed successfully, command 3 is executed. It can also be understood that command 2 is only executed after command 1 is executed successfully.
|
|
2006-10-29 07:46 |
|
|
yangzhiyi
中级用户
  
积分 261
发帖 123
注册 2006-6-6
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
Originally posted by lxmxn at 2006-10-29 07:46:
如果一个命令执行得比较慢,而下一个命令要利用这个命令的结果,那么可以利用一下命令连接符"&&"和"||",栮..
但是command 3 也要在command 1 执行完后才执行啊。
Originally posted by lxmxn at 2006-10-29 07:46:
If a command executes relatively slowly, and the next command needs to use the result of this command, then you can use the command connectors "&&" and "||", uh..
But command 3 also needs to be executed after command 1 is completed.
|
|
2006-10-29 08:18 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
Originally posted by yangzhiyi at 2006-10-29 08:18:
但是command 3 也要在command 1 执行完后才执行啊。
那你的目的是想实现什么呢?
Originally posted by yangzhiyi at 2006-10-29 08:18:
But command 3 also needs to be executed after command 1 is completed.
Then what is your purpose to achieve?
|
|
2006-10-29 08:25 |
|
|
yangzhiyi
中级用户
  
积分 261
发帖 123
注册 2006-6-6
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
呵呵,我已理解 这命令有什么用了。
Hehe, I have understood what this command is for.
|
|
2006-10-29 08:44 |
|
|
lizaoyou
中级用户
  
积分 210
发帖 85
注册 2007-1-14 来自 广东广州
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
win98或纯dos不支持>nul 2>nul,怎样实现屏蔽一切屏幕输出呢?
Win98 or pure DOS does not support >nul 2>nul. How to achieve blocking all screen output?
|
|
2007-2-10 05:55 |
|
|
qzwqzw
银牌会员
     天的白色影子
积分 2343
发帖 636
注册 2004-3-6
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
ctty nul
恢复用 ctty con
ctty nul
Restore with ctty con
|
|
2007-2-10 06:00 |
|
|
lizaoyou
中级用户
  
积分 210
发帖 85
注册 2007-1-14 来自 广东广州
状态 离线
|
『第 28 楼』:
使用 LLM 解释/回答一下
谢qzwqzw指点!解决了我多时的难题。
Thanks to qzwqzw for the guidance! It solved the problem that had been bothering me for a long time.
|
|
2007-2-10 06:22 |
|
|
csx163
初级用户
 
积分 97
发帖 45
注册 2007-1-31
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
想不通为什么直接在DOS下是| 而BAT却需要||
I can't figure out why it's | directly under DOS but || is needed in BAT
|
|
2007-2-10 14:19 |
|
|
kwxsuper
新手上路

积分 14
发帖 6
注册 2007-2-16
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
学习了>nul,,,,好东西
Learned about >nul, , , , good stuff
|
|
2007-2-16 14:08 |
|