Skip to content

Instantly share code, notes, and snippets.

@kapziel
Last active July 12, 2021 10:04
Show Gist options
  • Save kapziel/53d62a12eefab81dddbaf7fd0182017c to your computer and use it in GitHub Desktop.
Save kapziel/53d62a12eefab81dddbaf7fd0182017c to your computer and use it in GitHub Desktop.
Count lines of code (SQL) in git repo
// https://www.limilabs.com/blog/source-lines-of-code-count-using-powershell
(dir -include *.sql -recurse | select-string "^(\s*)//" -notMatch | select-string "^(\s*)$" -notMatch).Count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment