Quantcast
Channel: Thomas Maurer MVP - Cloud & Virtualization » Select-String
Viewing all articles
Browse latest Browse all 4

Powershell: Count your Code lines

$
0
0

Powershell Header

After Coding some lines in a lot of different files you wanna know how much lines you have coded. There are two (I am sure there are even more) ways to do that. The first one is to get the content of the files (Get-Content) and count the lines in there.

The other way and the fasterway is with Select-String:

(Get-ChildItem -Include *.ps1 -Recurse | Select-String -pattern .).Count

Viewing all articles
Browse latest Browse all 4

Trending Articles