nihaoareyou 当前离线
列兵
DAIC 当前离线
中将
gawk "NF<=9" 1.txt > 2.txt复制代码
TOP
CrLf 当前离线
论坛巡查
@echo off for /f "delims=" %%a in (a.txt) do ( for /f "tokens=9,10" %%b in ("%%a") do ( if %%b%%c==%%b echo %%a ) ) pause复制代码
pcl_test 当前离线
荣誉版主
@echo off ::假设txt都在E:\123\文件夹里,实际自行修改 cd /d "E:\123\" md "9列文档\" for /f "delims=" %%a in ('dir /a-d/b *.txt') do ( for /f "tokens=9,10" %%b in ('type "%%a"') do ( if "%%b%%c" equ "%%b" copy "%%a" "9列文档\" ) ) pause复制代码
terse 当前离线
c755731262 当前离线
二级士官
@echo off&color f0&setlocal enabledelayedexpansion for /f %%i in ('dir /b *.txt') do ( set m=0 for /f "delims=" %%a in (%%i) do ( set /a m+=1 if !m!==1 ( for %%j in (%%a) do ( set /a n+=1 ) if !n!==9 (move %%~nxi 9) else move %%~nxi 10 ) ) )复制代码