Mailinglist Archive: opensuse (3288 mails)

< Previous Next >
Re: [opensuse] search for word in huge txt file
  • From: Randall R Schulz <rschulz@xxxxxxxxx>
  • Date: Mon, 24 Dec 2007 15:39:33 -0800
  • Message-id: <200712241539.33624.rschulz@xxxxxxxxx>
On Monday 24 December 2007 15:11, Carlos E. R. wrote:

The pipe helps if the problem is grep trying and failing to allocate
the whole file in memory.

Hmm... Can you show me where any of the grep commands do that?

It's hard to imagine the code (by which I mean the programmer) doing
that in a program that is completely without the ability to match
across line boundaries. It has no benefit whatsoever.

Furthermore, operating on input supplied via a pipe does not in any way
preclude a program from reading its entire input into primary storage
before operating on that input. Relatively few programs even bother to
ascertain the kind of entity to which their descriptors are attached.


but that will not say the correct location of the match. ...

The OP (who seems to have lost interest...) just said "I have to find if
there is a specific word in the file."

Carlos E. R.

Randall Schulz
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups