Open nelsonic opened 4 years ago
1709 files:
The video suggests running the following script:
find . -name '*.php' -o -name '*.js' -o -name '*.css' -o -name '*.htaccess' -o -name '*.html' -o -name '*.xml' -o -name '*.txt' -o -name '*.scss' | xargs wc -l
But that outputs one total per file file extension and then you need to manually sum them. ⏳
Just the PHP is 426,099 lines of code. (but that includes comments and blank lines)
https://stackoverflow.com/questions/1358540/how-to-count-all-the-lines-of-code-in-a-directory-recursively https://stackoverflow.com/a/5121125/1148249 points to https://github.com/AlDanial/cloc literally "Count Lines of Code". But I don't want to install another executable on my Mac ...
( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l
Putting the two together:
(find . -name '*.php' -print0 -o -name '*.js' -print0 -o -name '*.css' -print0 -o -name '*.htaccess' -print0 -o -name '*.html' -print0 -o -name '*.xml' -print0 -o -name '*.txt' -print0 -o -name '*.scss' -print0 -o -name '*.sql' -print0 | xargs -0 cat) | wc -l
1,004,462 Lines of Code
1,004,462
1709 files:
The video suggests running the following script:
But that outputs one total per file file extension and then you need to manually sum them. ⏳
Just the PHP is 426,099 lines of code. (but that includes comments and blank lines)
https://stackoverflow.com/questions/1358540/how-to-count-all-the-lines-of-code-in-a-directory-recursively https://stackoverflow.com/a/5121125/1148249 points to https://github.com/AlDanial/cloc literally "Count Lines of Code". But I don't want to install another executable on my Mac ...
Putting the two together:
1,004,462
Lines of Code