The method of extracting the whole line of text for

Time:2021-2-23

This is what we usually write when we need to extract the entire line of text.

Copy codeThe code is as follows:
for /f “delims=” %%a in (a.txt) do echo.%%a

But the lines at the beginning of semicolon, for will also be ignored. Many times we need these lines. What should we do.
It’s too troublesome to use findstr and other external commands. It’s a good way to use EOL to ignore an invisible character, but it always ignores the line at the beginning of a character, and it’s also troublesome to get the invisible character.
In fact, there is a simpler way to put EOL at the end.

Copy codeThe code is as follows:
@echo off
REM can extract all the lines, which can be used with tokens at the same time, but can’t use space as the separator.
for /f “delims= eol=” %%a in (a.txt) do echo.%%a
pause