39 lines
4.1 KiB
HTML
39 lines
4.1 KiB
HTML
<p><span style="color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif; line-height: 25px; background-color: #f7fcff;"> 众所周知,如果echo后面跟一个环境变量,但是该变量却为空时,相当于不加任何参数的echo,即输出当前echo是on还是off。很多文章或者教程给出的解决方案都是在echo后面加一个点号echo.,这样就会输出空行。 </span></p>
|
||
<div style="padding: 0px 3px; margin: 3px auto 0px; border-left-color: #0099cc; border-left-width: 1px; border-left-style: solid; width: 600px; background-color: #f2f6fb; clear: both; border-top-color: #0099cc; border-top-width: 1px; border-top-style: solid; border-right-color: #0099cc; border-right-width: 1px; border-right-style: solid; line-height: 25px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="padding: 0px; margin: 0px; float: right; line-height: 25px; cursor: pointer;"> <span style="padding: 0px; margin: 0px; text-decoration: underline;">复制代码</span></span>代码如下:</div>
|
||
<div style="padding: 0px 3px 0px 5px; margin: 0px auto 3px; border: 1px solid #0099cc; width: 598px; background-color: #ddedfb; clear: both; line-height: 25px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif;"> <br style="padding: 0px; margin: 0px;" />
|
||
@echo off <br style="padding: 0px; margin: 0px;" />
|
||
echo <20>mon.tw% <br style="padding: 0px; margin: 0px;" />
|
||
:: ECHO is off. <br style="padding: 0px; margin: 0px;" />
|
||
echo.<2E>mon.tw% </div>
|
||
<p>
|
||
<br style="padding: 0px; margin: 0px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif; line-height: 25px; background-color: #f7fcff;" />
|
||
|
||
<span style="color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif; line-height: 25px; background-color: #f7fcff;">
|
||
pause据我所知,用echo输出空行至少有十种方法: </span></p>
|
||
<div style="padding: 0px 3px; margin: 3px auto 0px; border-left-color: #0099cc; border-left-width: 1px; border-left-style: solid; width: 600px; background-color: #f2f6fb; clear: both; border-top-color: #0099cc; border-top-width: 1px; border-top-style: solid; border-right-color: #0099cc; border-right-width: 1px; border-right-style: solid; line-height: 25px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif;">
|
||
<span style="padding: 0px; margin: 0px; float: right; line-height: 25px; cursor: pointer;">
|
||
<span style="padding: 0px; margin: 0px; text-decoration: underline;">复制代码</span></span>代码如下:</div>
|
||
<div style="padding: 0px 3px 0px 5px; margin: 0px auto 3px; border: 1px solid #0099cc; width: 598px; background-color: #ddedfb; clear: both; line-height: 25px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif;">
|
||
<br style="padding: 0px; margin: 0px;" />
|
||
@echo off <br style="padding: 0px; margin: 0px;" />
|
||
<br style="padding: 0px; margin: 0px;" />
|
||
echo= <br style="padding: 0px; margin: 0px;" />
|
||
echo, <br style="padding: 0px; margin: 0px;" />
|
||
echo; <br style="padding: 0px; margin: 0px;" />
|
||
<br style="padding: 0px; margin: 0px;" />
|
||
echo+ <br style="padding: 0px; margin: 0px;" />
|
||
echo/ <br style="padding: 0px; margin: 0px;" />
|
||
echo[ <br style="padding: 0px; margin: 0px;" />
|
||
echo] <br style="padding: 0px; margin: 0px;" />
|
||
<br style="padding: 0px; margin: 0px;" />
|
||
echo: <br style="padding: 0px; margin: 0px;" />
|
||
echo. <br style="padding: 0px; margin: 0px;" />
|
||
echo\ <br style="padding: 0px; margin: 0px;" />
|
||
pause </div>
|
||
<p>
|
||
<br style="padding: 0px; margin: 0px; color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif; line-height: 25px; background-color: #f7fcff;" />
|
||
|
||
<span style="color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif; line-height: 25px; background-color: #f7fcff;">
|
||
这十种方法可以分为三组,每组的效率依次递减。可悲的是,那些被奉为经典的教程给出的却是效率最低那组中的echo. </span></p>
|
||
<div><span style="color: #333333; font-family: Arial, Tahoma, Verdana, sans-serif;"><span style="line-height: 25px;">本文件截取自:</span></span><a href="http://www.jb51.net/article/30987.htm">http://www.jb51.net/article/30987.htm</a></div>
|
||
<p> </p> |