DOS 牛人请进
所有跟贴
·
加跟贴
·
新语丝读书论坛
送交者: jxh 于 2007-05-03, 22:35:53:
下面是test.bat的内容:
set JXH="GOOD"
if "%JXH%"=="GOOD" (
echo connect() > test.txt
echo give him something >> test.txt
echo exit() >> test.txt
)
当运行test.bat, 你将得到test.txt,但是其内容将是:
give him something
exit()
那个connect() 不见了。
怎么样让test.txt得到完整的内容?
所有跟贴:
use perl or vbs instead of dos+bat (无内容)
-
zhangyo
(0 bytes)
2007-05-06, 23:33:57
(139176)
这个问题
-
bu3bu4
(44 bytes)
2007-05-04, 07:01:12
(138894)
是否可以预先制备一个目标文件,条件满足直接拷贝?省得你全世界地问? (无内容)
-
过网烟云
(0 bytes)
2007-05-04, 04:20:59
(138885)
There are reasons one chooses this way
-
jxh
(118 bytes)
2007-05-04, 09:31:14
(138936)
DOS, I 彻底服了U, (无内容)
-
zhangyo
(0 bytes)
2007-05-04, 02:27:27
(138883)
try this,
-
zhangyo
(239 bytes)
2007-05-04, 02:29:42
(138884)
skywalker00 给出了办法
-
jxh
(212 bytes)
2007-05-03, 22:45:48
(138876)
For the completeness
-
jxh
(64 bytes)
2007-05-04, 09:28:34
(138935)
use quotation mark to make it a string
-
apple
(278 bytes)
2007-05-03, 22:44:36
(138875)
You would end up with the double quotes in your test.txt
-
jxh
(72 bytes)
2007-05-03, 22:47:53
(138877)
Really? I didn't see marks in my test. But you might be correct. (无内容)
-
apple
(0 bytes)
2007-05-03, 23:00:26
(138879)
加跟贴
笔名:
密码:
注册笔名请按这里
标题:
内容: (
BBCode使用说明
)