用下面的BAT去空格的后多了最后一句
for /f "delims=" %%a in (1.txt) do (
set "str=%%a"
call :delspace
)
:delspace
if "%str:~-1%" == " " set "str=%str:~0,-1%"&goto delspace
echo %str%>>2.txt
如1.txt
00
00
0 0
2.txt
00
00
0 0
0 0
应该改哪里呀
for /f "delims=" %%a in (1.txt) do (
set "str=%%a"
call :delspace
)
:delspace
if "%str:~-1%" == " " set "str=%str:~0,-1%"&goto delspace
echo %str%>>2.txt
如1.txt
00
00
0 0
2.txt
00
00
0 0
0 0
应该改哪里呀
