Skip to content
Back to formatted view

Raw Message

Message-ID: <hcpenc$gdo$1@ger.gmane.org>
Date: 2009-11-03T14:29:00Z
From: Johannes Graumann
Subject: Scanning grep through huge files

Hi,

I'm dealing which huge files I would like to index. On a linux system "grep 
-buo <PATTERN> <FILENAME>" hands me the byte offsets for "PATTERN" very 
quickly and I am looking to emulate that speed and ease with native R tools 
- for portability and elegance. "gregexpr" should be able to do that but I 
fail to combine it with "scan" or an equivalent to parse the whole file 
without having to read it all into memory.

I'd be grateful for any hints on how to do this without a "pipe("grep -buo 
<PATTERN> <FILENAME>")".

Thanks, Joh