回复 14# 1270697389
你七楼的文本可不是这样的,- @echo off&setlocal enabledelayedexpansion
- (for /f "tokens=1* delims=:" %%a in ('findstr /n .* a.txt') do (
- if "%%b" neq "" (
- set "str=%%b"
- if "!str!" neq "!str:北京=!" set "flag="
- if defined flag echo,%%b
- if "!str!" neq "!str:天津=!" set "flag=a"
- ) else (
- echo,
- )
- ))>new.txt
- start new.txt
复制代码
|