count (non-blank) lines-of-code in bash

前端 未结 19 1438
耶瑟儿~
耶瑟儿~ 2020-12-07 07:14

In Bash, how do I count the number of non-blank lines of code in a project?

相关标签:
19条回答
  • 2020-12-07 08:16

    If you want to use something other than a shell script, try CLOC:

    cloc counts blank lines, comment lines, and physical lines of source code in many programming languages. It is written entirely in Perl with no dependencies outside the standard distribution of Perl v5.6 and higher (code from some external modules is embedded within cloc) and so is quite portable.

    0 讨论(0)
提交回复
热议问题