Answer the question
In order to leave comments, you need to log in
Number of lines of code from *.coffee and *.py files in bash?
Can you tell me a command that returns the number of lines of code from *.coffee and *.py files on the bash in the project?
The project has a bunch of files, all extensions.
It is necessary to execute a command in the root directory on the bash so that it recursively goes through all the files and counts.
Answer the question
In order to leave comments, you need to log in
find ./ -type f \( -name "*.py" -o -name "*.py" \) -exec wc -l {} \; | awk '{sum+=$1} END{print sum}'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question