apang 当前离线
上将
@echo off&setlocal EnableDelayedExpansion for /f "delims=:" %%i in ('findstr /in "[INTEL" a.txt') do set n=%%i for /f "skip=%n% delims=" %%i in ('type a.txt') do ( set "str=%%i"&(if not "!str:~0,1!"=="[" (echo !str!) else pause&goto :eof) ) pause复制代码
评分人数
TOP
gawk 当前离线
少将
@echo off&setlocal EnableDelayedExpansion for /f "delims=[] skip=2" %%i in ('find /i /n "[INTEL" a.txt') do set n=%%i (for /f "eol=; skip=%n% delims=" %%i in ('type a.txt') do (set "str=%%i"&(if not "!str:~0,1!"=="[" (echo !str!) else goto :eof)))>b.txt复制代码
aries215 当前离线
三级士官
@echo off&setlocal EnableDelayedExpansion for /f "delims=[] skip=2" %%i in ('find /i /n "[INTEL" a.txt') do set n=%%i (for /f "eol=; skip=%n% delims=" %%i in ('type a.txt') do ( set "str=%%i"&(if not "!str:~0,1!"=="[" (echo !str!) else goto :eof) ))>b.txt复制代码
@echo off for /f "delims=[] skip=2" %%i in ('find /i /n "[INTEL" a.txt') do set n=%%i for /f "eol=; skip=%n% delims=" %%i in ('type a.txt') do ( set "str=%%i" setlocal EnableDelayedExpansion if "!str:~0,1!"=="[" pause&goto :eof endlocal echo %%i ) pause复制代码
fatcat 当前离线
二级士官
@echo off & setlocal enabledelayedexpansion > b.txt ( for /f "delims=" %%a in ('findstr /b /v ";" a.txt') do ( set lin=%%a if "!lin:~0,1!"=="[" (set print=0 if /i "!lin:~0,6!"=="[intel" set print=1 ) else if "!print!"=="1" echo %%a ) )复制代码