回复 6# bat好强大
第二步:对temp.log的进一步处理- @echo off
- setlocal enabledelayedexpansion
- (for /f "tokens=*" %%i in (temp.log) do (
- set str=%%i
- if "!str:~7!" neq "" (
- set strA=!str:~0,7!
- set strB=!str:~7!
- if not defined !strA! (
- echo,!strA!
- set strA=1
- )
- if not defined !strB! (
- echo,!strB!
- set strB=1
- )
- ) else (
- if not defined %%i (
- echo,%%i
- set %%i=1
- )
- )
- ))>temp_2.log
复制代码
|