楼顶文字与附件内容不一致。复制原文内容时不要修改内容、空格、空行。
按附件内容:win7以上。XP需安装PS2.0
Powershell: | gc abc.st|%{if($_){$n+=,($_.trim() -split '\s+')}};(0..$n.count)|%{if($n[$_] -cmatch '^ROTO'){(($_+1),($_+4))|%{4*65*$n[$_][2]/15}}} | | cmd /c pauseCOPY |
bat 混合ps 美化版 | @echo off | | PowerShell -ExecutionPolicy Bypass -c "gc abc.st|%%{if($_){$n+=,($_.trim() -split '\s+')}};(0..$n.count)|%%{if($n[$_] -cmatch '^ROTO'){(($_+1),($_+4))|%%{Write-Host $($n[$_][2])' ' -NoNewLine;Write-Host $(\"{0:n3}\" -f (4*65*$n[$_][2]/15)) -fore Red}}}" | | echo;&pauseCOPY |
|