diff --git a/lib/obp60task/code_size.ps1 b/lib/obp60task/code_size.ps1 new file mode 100644 index 0000000..0cf586b --- /dev/null +++ b/lib/obp60task/code_size.ps1 @@ -0,0 +1,12 @@ +param([string]$dir = ".") + +$total = 0 + +Get-ChildItem $dir -Recurse -Include *.c, *.cpp, *.h -File | ForEach-Object { + $lines = [System.IO.File]::ReadLines($_.FullName).Count + Write-Output "$($_.FullName) : $lines" + $total += $lines +} + +Write-Output "-----------------------" +Write-Output "Over all files: $total" \ No newline at end of file