[英]Windows CMD: Echo command without executing it
I need this line to be written into .txt file: 我需要将此行写入.txt文件:
do while (num < 10)
做一会(num <10)
I am trying to do it this way 我正在尝试这样做
echo do while (num < 10) >> 1.txt
回声做while(num <10)>> 1.txt
But it seems that cmd is just executing the comand and not writting it into file 但似乎cmd只是在执行命令,而不是将其写入文件
You may use: 您可以使用:
echo do while (num ^< 10) >> 1.txt
Where ^ escapes characters on cmd. 其中^在cmd上转义字符。 Here it escapes < which cmd might confuse with operator for inputiing data from file named 10 .
在这里它转义了< cmd可能会与运算符混淆的操作符,用于输入名为10的文件中的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.