Unix To PowerShell - Wc
PowerShell is definitely gaining momentum in the windows scripting world but I still hear folks wanting to rely on unix based tools to get their job done. In this series of posts I’m going to l...
Published Apr 15, 2009
Version 1.0Apr 15, 2009
Thanks Doug. There are a couple of issues with GC and Measure-Object in that they don't work well with multiple files while also itemizing the individual files. Also, blank lines are not counted in the line count for Measure-Object and newlines are not counted in the character count as they are in the unix wc command. I've modified the above to use Measure-Object but on a line by line basis. It did speed things up a bit.
-Joe