Monday 10 February 2014

How to measure number of lines of code using powershell command line

Someone asked me how many lines of code is there in your current platform. I googled to find a simple command line that I can run to find this without installing any special tool. I found following powershell command. Just wanted to share with everyone:

ls * -recurse -include *.aspx, *.ascx, *.cs, *.ps1 | Get-Content | Measure-Object -Line