rem %1 关键字
rem %2 查找的文件
for /f "usebackq tokens=1 delims=:"%%i in (`findstr /N /R "\<%1\>" %2`) do (
setskip=%%i && goto :end0
)
:end0
call :subfunc2 !skip! %2
exit /b
:subfunc2
for /f "skip=%1" %%i in (%2) do (
echo%%i
)
rem %1 关键字
rem %2 查找的文件
for /f "usebackq tokens=1 delims=:"%%i in (`findstr /N /R "\<%1\>" %2`) do (
setskip=%%i && goto :end0
)
:end0
call :subfunc2 !skip! %2
exit /b
:subfunc2
for /f "skip=%1" %%i in (%2) do (
echo%%i
)