hijackle 当前离线
一级士官
Hello123World 当前离线
荣誉版主
@echo off For /f "delims=" %%i in ('dir /b *.txt') do findstr /v "Name=bbbbbbb id=12321421 id=123214214 Name=aaaaaa" "%%i">>"%%~nih%%~xi" pause复制代码
TOP
CUer 当前离线
上尉
gawk -v RS= "$0!~/Name=aaaaaa/&&$0!~/Name=bbbbbb/" a.txt复制代码
ArdentMan 当前离线
中尉
@Echo Off&SetLocal EnableDelayedExpansion For %%a In (*.txt) Do ( Set "Str=" (For /F "delims=" %%b In ('Type "%%a"^&Echo end') Do ( For %%c IN (aaaaaa bbbbb) Do If "%%b" EQU "Name=%%c" Set "Str=" If Defined Str Echo !Str!&Echo %%b Set "Str=%%b" )>tem Move tem "%%a" )复制代码
lvsehuaxue 当前离线
六级士官
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (a.txt) do set %%i&set /a n=n%%2+1&if !n!==2 echo %%i|findstr "aaaaaa bbbbbbb">nul||(echo id=!id!&echo Name=!Name!) pause复制代码
@echo off&setlocal enabledelayedexpansion for /f "delims=" %%i in (a.txt) do ( set /a n=n%%2+1 set a=!b! set b=%%i if !n!==2 ( echo !b!|findstr "Name=aaaaaa Name=bbbbbbb">nul || (echo !a!&echo !b!) ) ) pause复制代码
601997526 当前离线
@echo off&setlocal ENABLEDELAYEDEXPANSION for /f %%i in (a.txt) do (set %%i echo.%%i|findstr /i "^name=">nul&&if "!name!"=="aaaaaa" (echo.>nul) else (if not "!name!"=="bbbbbbb" echo id=!id!&echo name=!name!)) pause复制代码
评分人数
mxxcgzxxx (黑雨)当前离线