Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Pablo Manalastas
Subject: Re: [plug] Maximum number of lines wc can count To: Philippine Linux Users' Group (PLUG) Technical Discussion List plug@lists.linux.org.ph Date: Monday, February 16, 2009, 4:31 PM Since Google can't answer me, I download the coreutils source package in which wc belongs

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread fooler mail
On Wed, Feb 18, 2009 at 7:08 PM, Pablo Manalastas prmanalas...@yahoo.com wrote: uintmax_t can't count to 100 billion. But since you have coreutils source, you can always recompile a version of wc using type long long for total_lines. Galing talaga ng open source! doc.. uintmax_t or unsigned

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Drexx Laggui [personal]
. --- On Mon, 2/16/09, Ramil Galib drak...@gmail.com wrote: From: Ramil Galib drak...@gmail.com Subject: Re: [plug] Maximum number of lines wc can count To: Philippine Linux Users' Group (PLUG) Technical Discussion List plug@lists.linux.org.ph Date: Monday, February 16, 2009, 4:31 PM Since Google can't

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Pablo Manalastas
of lines wc can count To: Philippine Linux Users' Group (PLUG) Technical Discussion List plug@lists.linux.org.ph Date: Wednesday, February 18, 2009, 7:25 PM On Wed, Feb 18, 2009 at 7:08 PM, Pablo Manalastas prmanalas...@yahoo.com wrote: uintmax_t can't count to 100 billion. But since you have

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Pablo Manalastas
] Maximum number of lines wc can count To: Philippine Linux Users' Group (PLUG) Technical Discussion List plug@lists.linux.org.ph Date: Wednesday, February 18, 2009, 7:38 PM 18Feb2009 (UTC +8) On Wed, Feb 18, 2009 at 7:08 PM, Pablo Manalastas prmanalas...@yahoo.com wrote: uintmax_t can't count

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread fooler mail
On Wed, Feb 18, 2009 at 10:14 PM, Pablo Manalastas prmanalas...@yahoo.com wrote: Ramil's original problem is not how to read all those tens of gigabytes of text data, but the more simple problem of keeping a count of the number of lines read, since if wc uses int (fortunately it does not),

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Roger Filomeno
err.. using SSE http://snippets.dzone.com/posts/show/6312 but change count to unsigned long int -- Roger P. Filomeno TwitSnap: The coolest Twitter widget for your site! http://www.twitsnap.com http://corruptedpartition.blogspot.com/ TEL#: +1-360-968-1767 SMS: send MSG GODIE YOUR MESSAGE to 2948

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread fooler mail
On Thu, Feb 19, 2009 at 12:46 AM, Roger Filomeno alienatedn...@gmail.com wrote: err.. using SSE http://snippets.dzone.com/posts/show/6312 yup that is much faster than wc.c... SSE is using inline assembly code for i386 to speed up the searching method but suffers from portability to other

Re: [plug] Maximum number of lines wc can count

2009-02-18 Thread Ramil Galib
Thanks for the insights. wc is ok for me, counting takes at about 15 minutes for the files, which is ok for me. Now, just a gotcha, when I have to use awk to crunch these large files, it returns an error. I just realized that in Ubuntu, awk refers to mawk. I have to install gawk. Things are

Re: [plug] Maximum number of lines wc can count

2009-02-16 Thread Ramil Galib
Since Google can't answer me, I download the coreutils source package in which wc belongs. the variable total_lines is of type uintmax_t. Now I'm getting somewhere. On 2/16/09, Roger Filomeno alienatedn...@gmail.com wrote: I should since the whole file is not actually loaded into memory. Its

[plug] Maximum number of lines wc can count

2009-02-15 Thread Ramil Galib
Hi All, I have text files ranging from 5 to 10 GB. I want to use wc -l to count the number of lines of these files. I expect the number of lines to be from 50 to 100 billion. Can wc handle this? Hope you can help. Thanks! Ramil _ Philippine Linux

Re: [plug] Maximum number of lines wc can count

2009-02-15 Thread Roger Filomeno
I should since the whole file is not actually loaded into memory. Its jst going to take a lot of I/O -- Roger P. Filomeno TwitSnap: The coolest Twitter widget for your site! http://www.twitsnap.com http://corruptedpartition.blogspot.com/ TEL#: +1-360-968-1767 SMS: send MSG GODIE YOUR MESSAGE to