From af9bca4d6616ab2c4c41a9ffb52bf4a8c9823dae Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Fri, 6 Mar 2026 14:59:06 +0100 Subject: [PATCH] Add power shell script --- lib/obp60task/code_size.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/obp60task/code_size.ps1 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