ruby - Using cloc (count Lines of Codes) result -


i writing script research, , want total number of lines in source file. came around cloc , think going use in script.

however, cloc gives result many information (unfortunately since new member cannot upload photo). gives number of files, number of lines, number of blank lines, number of comment lines, , other graphical representation stuff.

i interested in number of lines use on calculations. there way number (maybe performing options in command line (although went through available options , didn't find useful case))?

i thought regular expression on result number; however, first time using cloc , there might better/professional way of doing it.

any thought?

regards, arwa

i not sure cloc. worth using default shell command. please have @ this question.
number of lines of code individually

find . -name '*.*' | xargs wc -l 

to total number of lines of code in directory.

(find ./ -name '*.*' -print0 | xargs -0 cat) | wc -l  

please note if need number of lines files specific extension use *.ext.
*.rb, if ruby.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -