写入批处理文件 ( .bat) 时,ECHO.用于在屏幕上打印一个空行。
这是如何运作的?.命令名称后的a 有什么意义?
从下面的测试来看,执行类似命令PROMPT.与执行PROMPT .. 为什么会这样?
执行命令名称后带一个点的各种命令的结果:
ECHO. prints blank line
DIR. lists current directory (as if no dot is present)
EXIT. exits
HELP. command not found
VER. prints windows version (as if no dot is present)
CD. does nothing (contrary to `CD` which prints the current directory)
CLS. clears the screen (as if no dot is present)
VOL. "The system cannot find the drive specified."
SET. "Environment variable . not defined"
TYPE. "Access is denied."
PATH. changes %PATH% to .
SHUTDOWN. command not found
PROMPT. changes the prompt to .
TITLE. changes the title to .
Run Code Online (Sandbox Code Playgroud)
小智 1
我想你已经回答了你自己的问题......
句号是一种具有不同结果的争论。对于 ECHO 命令,在这种情况下,这是一种放置空行的方法(没有 .,您可以获得会话变量的状态)。也许你可以使用它找到一些隐藏的命令:D
| 归档时间: |
|
| 查看次数: |
4127 次 |
| 最近记录: |