http://use.perl.org/~xsawyerx/journal/39110
xoxo,
Andy
--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance
Your example should somehow exclude the lines that aren't source...
since the filename is on a separate line and there's all those blank
lines... the line count has a different meaning imo -- not that I
think the grep is really accurate either...
--
If riding in an airplane is flying, then riding in a boat is swimming.
107 jumps, 43.5 minutes of freefall, 83.4 freefall miles.
These are all just approximations anyways. You'll find occurrences
of "goto" in comments as well, and they shouldn't really count either.
# like "goto http://whatever.com for more information"
Andy's point is still valid that you can get pretty much the same
information much easier using just ack then fiddling with find and grep.
Cheers,
-Jan
> Andy's point is still valid that you can get pretty much the same
> information much easier using just ack then fiddling with find and
> grep.
Right, I wasn't trying to be more accurate in the measurements, but to
show an easier way to get the same results.
In so many threads around the net I see people say "You can do
everything in ack that you can do with grep and find," and my answer
is "Sure you CAN, but why would you want to?"
xoa
No, I get it. But *my* point was that it wasn't directly equivalent.
It's pretty common to count lines with grep. Maybe ack should have a
line counting mode built in, or the line should have been ...
ack stuff | ack : | wc -l
... just to be fair.
My point wasn't to say: Andy doesn't get it. Ack is cool. :P
i post processed the ack output to count comments and quoted strings,
since they were quite stylized. wouldn't work if obfuscated but when a
codebase follows any styleguide, one can rely on that.
--
Bill
n1...@arrl.net bill....@gmail.com
> is "Sure you CAN, but why would you want to?"