Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
You may need to [GC]::Collect() after this because it uses a lot of RAM
param([string]$Path = (Get-Location))
$count = @{}
ls $Path -include *.pgn -recurse | Get-Content | ?{$_ -match 'Result '} | %{$count[$_]+=1}
Write-Output $count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment