How to apply a regexp search on large TXT files?

  • Thread starter Thread starter jfbarro
  • Start date Start date
J

jfbarro

Hi!


We need to search on very large file using regular expression, is
there any tool which search through a line by line base? Thus it will
not need to load the whole file before starting the search.


Thanks in advance
 
We need to search on very large file using regular expression, is
there any tool which search through a line by line base? Thus it will
not need to load the whole file before starting the search.

Sed will probably do it:

"The editor keeps only a few lines of the file being edited in memory at
one time, and does not use temporary files. Therefore, the file to be
edited can be any size as long as there is room for both the input file
and the output file in the file system." --

http://publib16.boulder.ibm.com/pseries/en_US/aixprggd/genprogc/manip_st
rings_sed.htm

Sed FAQ:
http://www.student.northpark.edu/pemente/sed/sedfaq.html

Link to Super Sed binary for MSDOS/Windows:
http://www.student.northpark.edu/pemente/sed/#ssed

(I just downloaded it to check if it runs under XP's cmd CLI instead of
DOS. Invoking it raised the options screen without complaint)
 
We need to search on very large file using regular expression, is
there any tool which search through a line by line base? Thus it will
not need to load the whole file before starting the search.

Unix-style tools like "grep", "sed" and "awk" are designed to do
exactly that. Freeware command-line versions of all three can be
found at <http://unxutils.sourceforge.net/> along with a link to
documentation.

If you hate command-line programs, see the "Search and Replace"
section in
<http://www.pricelesswarehome.org/2006/PL2006FILEUTILITIES.php>
 
Back
Top