【发布时间】:2024-01-11 08:21:01
【问题描述】:
有点棘手。如何在批处理文件中正确转义以下内容?
echo /? display this help text
这种特殊的字符组合被视为“ECHO /?”命令:
C:\Batch>ECHO /? display this help text
Displays messages, or turns command-echoing on or off.
ECHO [ON | OFF]
ECHO [message]
Type ECHO without parameters to display the current echo setting.
它不响应插入符号 (^) 转义,即。我试过了^/? /^?和^/^?。
注意:作为一种解决方法,我发现在其间插入其他字符足以绕过 ECHO 命令行处理器,例如:
echo ... /? display this help text
不过,这并不理想,我想知道是否有一种方法可以实现所需的输出,即使用 /?在回显消息的开头。
【问题讨论】:
标签: batch-file escaping cmd dos echo