Skip to content

Instantly share code, notes, and snippets.

@nlively
Created April 5, 2012 19:02
Show Gist options
  • Save nlively/2313259 to your computer and use it in GitHub Desktop.
Save nlively/2313259 to your computer and use it in GitHub Desktop.
Count lines of code in a rails project
#!/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
@Parasgr7
Copy link

Thanks!

@Merovex
Copy link

Merovex commented Feb 2, 2021

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