如题:
这种结构的代码:
- @echo off
- for /f "tokens=1* delims=:" %%a in ('type list.txt^|findstr /n .*^|find /i "ie"') do (
- for /f "skip=%%a delims=" %%i in (list.txt) do @echo %%i
- )
- pause
复制代码
- @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=1* delims=:" %%a in ('type list.txt^|findstr /n .*^|find /i "ie"') do (
- set num=%%a
- for /f "skip=!num! delims=" %%i in (list.txt) do @echo %%i
- )
- pause
复制代码
这两种方法都不行,除非两个for分开来才可以,这是什么原因呢? |