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

Re: searching files for patterns

On Thu, 3 Feb 2000 zdrysdal@diagnostic.co.nz wrote:
> is this the best/fastest way to search through 800,000 hl7 files?
> for each file i am grepping for 6 names... thus each file is
> scanned/grepped 6 times over.  Basically i am searching for 1 name in 4 1/2
> million files.  Even though the server is fast, it is still processing on
> average 2 files per second.
As far as I understand, with executing the skript, not only the files are
scanned but also some binaries are executed several times for each

 Would in not be best to write a little program that does the whole
thing for you and stays in memory? 

This way the file is read once in a buffer, you operate on it and discard

That should be much less overhead.

Reply to: