FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 06-19-2010, 10:23 PM
Gaurish Sharma
 
Default Counting Lines of Code

Hi,
I am trying to get a rough idea on total line of code in my php
project. Currently, I use this command.

$ ( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l

But it empty lines/comments, hence the figure is huge. Any other Alternative?

Regards,
Gaurish Sharma
www.gaurishsharma.com
 
Old 06-19-2010, 10:33 PM
Allan McRae
 
Default Counting Lines of Code

On 20/06/10 08:23, Gaurish Sharma wrote:

Hi,
I am trying to get a rough idea on total line of code in my php
project. Currently, I use this command.

$ ( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l

But it empty lines/comments, hence the figure is huge. Any other Alternative?



community/sloccount 2.26-5
Tools for counting physical source lines of code
 
Old 06-19-2010, 10:33 PM
Evangelos Foutras
 
Default Counting Lines of Code

On Sun, Jun 20, 2010 at 1:33 AM, Allan McRae <allan@archlinux.org> wrote:
> On 20/06/10 08:23, Gaurish Sharma wrote:
>>
>> Hi,
>> I am trying to get a rough idea on total line of code in my php
>> project. Currently, I use this command.
>>
>> $ ( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l
>>
>> But it empty lines/comments, hence the figure is huge. Any other
>> Alternative?
>>
>
> community/sloccount 2.26-5
> * *Tools for counting physical source lines of code

There's also community/cloc (which I maintain; shameless plug :P)
However, I don't know which is the better of the two. :P
 
Old 06-19-2010, 11:00 PM
Gaurish Sharma
 
Default Counting Lines of Code

Thanks Evangelost & Allon. I have Found what I was looking for.


Gaurish
 

Thread Tools




All times are GMT. The time now is 08:12 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org