bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wc can not count very large file


From: pwu
Subject: Re: wc can not count very large file
Date: Thu, 07 Oct 2004 10:46:34 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608

Philip Rowlands wrote:

On Thu, 7 Oct 2004 address@hidden wrote:

find . -name '*.[ch]' -print0 |
xargs -r0 wc -l |
grep -Ev "^[ ]+ [0-9]+ total" |
tr -s ' ' |
cut -f2 -d' ' |
(tr '\n' +; echo 0) |
bc

I name that tune in 3:
find . -type f -name '*.[ch]' -print0 |
xargs -r0 -n1 wc -l |
awk '{total += $1} END {print total}'


Cheers,
Phil

P.S. Is there some slowdown/moderation on this list? My last email I
sent took 14 hours to make it back to my, whereas other threads are
fairly snappy. We'll see on this one, sent at 11:43 GMT...

Those two scripts are not equal. The second = first_one x 2. And the first one give the right number.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]