
CODE: [Copy to clipboard]@echo off 2>nul 3>nul
if "%~1" == "" (set/pfile=file:) else (set file=%~1)
if "%~2" == "" (set/pline="line?(1+3):") else (set line=%~2)
for /f "delims=+" %%i in ("%line%") do set/asta=%%i-1,stb=%line%-1||goto end
for /f "usebackq delims=" %%i in ("%file%") do (
set/ax+=1,1/^(sta/x^)||echo ^>%%i
set/aa+=1,1/^(a-stb^)||goto end
)
:end
echo 以上是%file%的第%sta%至%stb%行,若没有显示可能是输入错误
pause
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |