File I/O (Advanced Question)

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

Hi All, I have really large files (>300MB) to process in my application. I
wanted to build a mini index of the records within it before I proceed with
chopping/processing it. I was wondering is there something similar to grep
command of UNIX in Windows so that I can grep all the lines (with some
pattern) before I proceed on with reading the file and processing it?
I know the alternative soln of reading line by line and processing it.

TIA
 
Vai2000,

The closest thing that there is would be the RegEx library in .NET.
However, for files of that size, it isn't a good thing, because the
libraries take a string, and loading a 300MB string into memory isn't really
a good thing.

In the end, you might have to go through it line by line.

Hope this helps.
 
Back
Top