Skip to content

Instantly share code, notes, and snippets.

@vermorel
Created November 24, 2011 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vermorel/1391893 to your computer and use it in GitHub Desktop.
Save vermorel/1391893 to your computer and use it in GitHub Desktop.
measure-loc, PowerShell function, Recurse directories and compute the number of C# lines
# Measure-Loc
# By Joannes Vermorel, 2010
# Recurse directories and compute the number of C# lines
# Usage: measure-loc
function Measure-Loc
{
param(
)
begin
{
}
process
{
ls -recurse -filter *.cs | gc | ? { $_.Trim().Length -gt 1 } | measure-object -line
}
end
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment