tools added Get-TextCasesDuration.ps1

This commit is contained in:
silverqx
2024-01-16 10:11:54 +01:00
parent 4465a411a8
commit 1b34cde08b
+15
View File
@@ -0,0 +1,15 @@
#!/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