meiszp 当前离线
二级士官
TOP
hfxiang 当前离线
上尉
gawk -v"OFS=\t" "/excluding mass coefficients/,/\*{60,}/{if(/MAIN/){A[++i]=$5;A[++i]=$11}if(/\*{60,}/)print substr(FILENAME,1,length(FILENAME)-4),A[1],A[2],A[3],A[4];next}{i=0}" *.txt>out.txt复制代码
aloha20200628 当前在线
@echo off &setlocal enabledelayedexpansion (for /f "delims=" %%F in ('dir /b/s/a-d *.txt') do ( set "v=%%~nF" for /f "tokens=1-4 delims==[" %%1 in ('findstr /ic:"MAIN ST. K =" /ic:"MAIN D. C =" "%%F"^|more +2') do ( set "v=!v! %%2 %%4" ) echo,!v: =! ))>out.txt.new复制代码
77七 当前在线
中校
@echo off chcp 65001 >nul cd /d "%~dp0" (for /f "delims=" %%x in ('dir /b /a-d *.txt ^|find /v "out.txt"') do ( for /f "useback tokens=1-12" %%a in ("%%x") do ( if /i "%%a%%b%%c" equ "excludingmasscoefficients" ( set m=1 ) else if defined m ( if /i "%%a%%b%%c" equ "MAINST.K" ( set /p="%%~nx %%e %%k"<nul ) else if /i "%%a%%b%%c" equ "MAIND.C" ( echo= %%e %%k set m= ) ) ) ))>"out.txt" pause复制代码
terse 当前离线
中将
@echo off&setlocal enabledelayedexpansion (for /f "delims=" %%f in ('dir /b /a-d *.txt') do ( set "exc=" for /f "usebackq tokens=*" %%i in ("%%f") do ( if defined exc ( for /f "tokens=2,3delims==" %%a in ("%%i") do ( if "%%b" neq "" ( for %%A in ("%%a" "%%b") do ( for /f %%c in (%%A) do set "exc=!exc! %%c" ) ) else ( echo !exc! set "exc=" ) ) ) if /i "%%~xni" == "excluding mass coefficients" (set exc=%%~nf) ) ))>out.txt 2>nul pause复制代码