Created
April 5, 2012 19:02
-
-
Save nlively/2313259 to your computer and use it in GitHub Desktop.
Count lines of code in a rails project
This file contains 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
#!/bin/bash | |
find . \( -iname '*.rb' -o -iname '*.css' -o -iname '*.js' -o -iname '*.erb' -o -iname '*.html' -o -iname '*.haml' -o -iname '*.scss' -o -iname '*.coffee' \) -exec wc -l {} + | sort -n |
you can run this command: rake stats
Great work! You can combine it with grep.
@jvidalba1: This one is counting each file. Different than rake stats.
Thanks!
Yeah, no. I have 2.3M cloc? This picks up a lot of extraneous junk. I'll stick with rake stats
. :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks!