Created
September 16, 2012 00:57
-
-
Save fakenickels/3730633 to your computer and use it in GitHub Desktop.
Count lines of a project. It scans folder( and subfolders ) files and count total lines
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
#!/usr/bin/ruby | |
require 'find' | |
if ARGV[0] | |
puts "Wait..." | |
Find.find( ARGV[0] ) do |f| | |
totalLength += IO.readlines(f).size if File.file? f | |
end | |
end | |
puts "\tProject total lines #{totalLength}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment