- @echo off
- for /f tokens^=2^ delims^=^" %%a in (a.txt) do (
- if not "%%a"=="" (
- set /a n+=1
- setlocal enabledelayedexpansion
- if !n!==4 (endlocal&echo,%%a) else endlocal
- )
- )
- pause
复制代码
- @echo off
- for /f tokens^=2^ delims^=^" %%a in (a.txt) do (
- if not "%%a"=="" (
- set /a "n+=1,1/(n-4)" 2>nul||echo,%%a
- )
- )
- pause
复制代码
|