I have a very large log file in which I need to count the occurrences of all the variations of a particular string; that is:
There are a large number of file IDs that appear in the format AA000####. I have to find out what the top five or ten IDs are in this file (which ones appear the most times).
I figure this can be done with select-string and regular expressions?
If you want to break out just the title portion (which I'm guessing you do) and not group based on the whole URL (which could contain information specific to that visit) you need to get the value of the title parameter like so:
This is off the top of my head but you should be able to do this with a one-liner.
You can either shove it in a variable and get the length of that variable like so:
Or our can just do it all inline by using parens:
You can do you top count with the group-object cmdlet.
That is pretty ugly right now, but you should be able to go from there