Files
TinyORM/tools/Get-TextCasesDuration.ps1
T
2024-02-05 16:27:42 +01:00

16 lines
312 B
PowerShell

#!/usr/bin/env pwsh
Set-StrictMode -Version 3.0
$result = 0
Get-Content .\pp.txt
| Select-String -Pattern '^ <Duration msecs="(.*)"/>'
| ForEach-Object {
$_ -cmatch '<Duration msecs="(.*)"/>' | Out-Null
[float] $Matches[1]
}
| ForEach-Object { $result += $_ }
$result / 1000