I was curious how many lines of code were in PHPBB 3. I only wanted to know about the .php files.

find . -name ‘*.php’ -exec wc -l {} \; | awk ‘{ SUM += $1 } END {print SUM}’

The downside to this is that it includes whitespace and braces as lines, as well as comments. Oh well. It’s a good approximation.

Edit: There are 172,189 lines of code in phpbb3.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
 

One Response to How many lines of code?

  1. Josh says:

    Good shit. I need to learn more about awk.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>