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

前端 未结 19 1442
耶瑟儿~
耶瑟儿~ 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 07:52

    There's already a program for this on linux called 'wc'.

    Just

    wc -l *.c 
    

    and it gives you the total lines and the lines for each file.

提交回复
热议问题