- @echo off
- setlocal enabledelayedexpansion
-
- for /f "delims=" %%a in (a.txt) do (
- for %%i in (%%a) do set/p var=%%i <nul
- echo;
- )>>tmp.txt
-
- for /f "delims=" %%a in (tmp.txt) do (
- set line=%%a
- set line=!line: 0=#!
- set line=!line:##=_!
- set line=!line:#= 0!
- for /f "tokens=1 delims=_" %%i in ("!line!") do echo;%%i
- )
- del tmp.txt
- pause
复制代码
|