It is used to get the ECHO statement to output a blank line. In accordance with its design, the ECHO issued blank or with just white space after the command text, outputs the current 'echo' status, that is ON or OFF. To support the outputting of blank lines a dot is commonly appended to the command, as in ...
echo.
However, that is not the only character that will result in the same behavior. For example try forward and back slashes, commas, semicolons, either square bracket, the plus sign, the equal sign and the open parenthesis (but not the closing one). I think that's an exhaustive list.
This approach is also used in situations where it is not known whether the line will be blank or not, such as when an environment variable or replaceable argument is being displayed, but could be empty, as in ...
echo.%1
or
echo.%SomeVar%
Probably more than you ever wanted (or needed) to know ;-)
ECHO.
最新推荐文章于 2021-12-27 10:34:09 发布