Greetings msh210,
The MCE module includes a small demonstration for scanning file(s) quickly with the ability to stop upon reaching the first match.
/path/to/egrep.pl --help /path/to/egrep.pl --max-count=1 -n "str1|str2|str3" /path/to/huge_file
It scans the file in chunks with parallelism enabled. It's quite fast.
Regards, Mario
In reply to Re: grepping a large file and stopping on first match to a list
by marioroy
in thread grepping a large file and stopping on first match to a list
by msh210
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |