Re:Why GNU grep is Fast
by sigil on Monday August 23, 2010 @12:58PM
(#1627263)
I used this trick the other day -- compute byte range partitions on a large file and use fseek when processing each. Is there a standard unix program that can output an arbitrary byte range from a seekable input? At first blush dd(1) looked like the ticket, but block-oriented operation means extra invocations to deal with a byte range that's not necessarily block-aligned.
[ Parent
| on HN ]
tail -c offset [input] | head -c length
will do the job.