执行 batch 脚本:
@ECHO OFF
@ECHO
@ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ECHO Testing....
@ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ECHO
执行结果如下:
ECHO is off.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Testing....
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ECHO is off.
ECHO is off. 显示在输出结果中。
由于脚本中 @ECHO 后面没有参数。而没有 参数的 ECHO, 会把当前脚本 ECHO 命令行的状态(ON/OFF)显示出来,显示出的结果也就是:
ECHO is off.
ECHO is on.
如果想输出空行,可以用下面的命令:
echo.
echo=
echo( echo[ echo] echo+
修改脚本:
@ECHO OFF
@ECHO.
@ECHO. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ECHO. Testing....
@ECHO. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ECHO.
输出结果就工整了很多:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Testing....
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Alert !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!