标题:
for 命令中的括号问题
[打印本页]
作者:
ge_xin_yu
时间:
2010-10-8 19:31
标题:
for 命令中的括号问题
命令如下:
for %%a in (1,2) do (
echo a() >1.txt
echo b() >>1.txt
)
希望得到如下结果:
a()
b()
但是运行的结果为:
a(
b()
缺少一个括号,检查是for命令将a后的右括号作为命令结束的标志。这种情况如何解决?请大家帮忙看看,非常感谢!!
作者:
DOSroot
时间:
2010-10-8 23:48
你这是在 DOS 环境下吗?
作者:
ge_xin_yu
时间:
2010-10-9 09:28
是的,xp的批处理文件
作者:
ge_xin_yu
时间:
2010-10-9 17:43
无人知道吗???
作者:
DOSroot
时间:
2010-10-10 01:53
Quote:
Originally posted by
Climbing
at 2004-11-25 00:00:
多看置顶帖。
http://www.cn-dos.net/forum/viewthread.php?tid=46409
作者:
photonjl
时间:
2010-10-10 16:39
记得在bathhome网站回复过............
CODE:
[Copy to clipboard]
for %%a in (1,2) do (
echo a(^) >1.txt
echo b(^) >>1.txt
)
欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/)
Powered by Discuz! 2.5