Re: Getting loc
- From: "C. (http://symcbean.blogspot.com/)" <colin.mckinnon@xxxxxxxxx>
- Date: Thu, 12 Jun 2008 05:32:14 -0700 (PDT)
On Jun 7, 3:43 pm, "Aaron Gray" <ang.use...@xxxxxxxxx> wrote:
Hi,
I have asked this question before but cannot find the thread on Google
Groups.
Basicaly I want a line of shell code that counts the number of non blank
lines of code in a file, directory or directory tree.
Many thanks in advance,
Aaron
for a file or dir:
grep -e '[a-zA-Z]' srcfile | wc
for a tree it would be a bit more complicated. You'd need to sum up
the outputs from the above.
But really SLOC counts should omit comments too - thats a bit more
tricky.
C.
.
- References:
- Getting loc
- From: Aaron Gray
- Getting loc
- Prev by Date: Re: sendmail setup
- Next by Date: Re: RHEL 5.1 > RHEL 5.2 Dependency Hell.
- Previous by thread: Getting loc
- Next by thread: Linux driver needed for SN9C203 CMOS Camera 1.3M
- Index(es):
Relevant Pages
|