Created
March 10, 2012 12:23
-
-
Save Pablo-Merino/2011286 to your computer and use it in GitHub Desktop.
Script to count the line numbers of all the files in the actual dir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total = 0 | |
Dir["./**/*.*"].each do |f| | |
filenumber =%x{wc -l #{f}}.split.first | |
puts f+ " - "+count = filenumber | |
total = total + filenumber.to_i | |
end | |
puts "Total lines = #{total}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment