哪些呢符号^表示在批处理脚本 [英] what does symbol ^ means in Batch script
问题描述
在此命令:
FOR /F %%A IN ('TYPE "%InFile%"^|find /v /c ""')DO SET "Till=%%A"
什么是 ^
意思?
推荐答案
的^符号(也称为插入符号或音调)是批处理脚本转义字符。当它被使用时,下一个字符是PTED作为一个普通的字符间$ P $。
The ^ symbol (also called caret or circumflex) is an escape character in Batch script. When it is used, the next character is interpreted as an ordinary character.
在你的脚本,TYPE命令的输出写成输入查找命令。结果
如果你没有在之前使用转义字符^ |
,那么的常规含义|
是<一个href=\"http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true\">pipe性格。
In your script, the output of the TYPE command to be written as the input to the FIND command.
If you don't use the escape character ^ before the |
, then the regular meaning of |
is a pipe character.
的<一个href=\"http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/echo.mspx?mfr=true\">Documentation说:
要显示管道(|)或重定向字符(小于或>)当您使用的回声,管道或重定向字符(例如,^>,^&LT,或之前立即使用脱字符^ | )。如果需要使用脱字符(^),二型(^^)。
To display a pipe (|) or redirection character (< or >) when you are using echo, use a caret character immediately before the pipe or redirection character (for example, ^>, ^<, or ^| ). If you need to use the caret character (^), type two (^^).
这篇关于哪些呢符号^表示在批处理脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!