【发布时间】:2018-02-19 19:21:42
【问题描述】:
我需要回显一个 html 字符串;
echo <html><body></body></html>;
result < it was unexpected
echo "<html><body></body></html>";
result "<html><body></body></html>";
我不想显示双引号;
echo ^<html^>^</html^>
result <html></html>
它对我来说很完美,但是字符串很大,如果我给所有字符加上 scape ,它将超过提示的限制大小;
注意,我无法将此字符串保存到文件中。
【问题讨论】:
-
你的意思是逃跑吗?
-
您可以使用
set /P "=<html><body></body></html>;" < nul后跟echo/ -
谢谢@Aacini,你的方法奏效了。
标签: windows batch-file command-line cmd command-line-arguments