@echo off
setlocal enabledelayedexpansion
set icount=0
del B.txt>nul 2>1
copy nul B.txt>nul
for /f %%i in ('type A.txt') do (
set /a icount=icount+1
set itest=0
for %%j in (2 5 9 10 11) do (
if !icount! EQU %%j (set itest=1)
)
if !itest! EQU 0 (echo %%i>>B.txt)
)
保存为bat,放在A.txt的文件夹运行。A.txt是输入文件,行数在(2 5 9 10 11)中写的,可以自己修改,输出的结果在B.txt中