in reply to Efficient Way to Parse a Large Log File with a Large Regex

From your tail -f comment, this is a running log. If so, you can trim down your time by saving off the last position that you ended with in the file with tell and reading it back in at script start and using seek. That way, you're only looking at new entries every time.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come

  • Comment on Re: Efficient Way to Parse a Large Log File with a Large Regex