I have a large text file of a million sections. Each section contains A lines of header and B lines of numeric data.
I want to read the first and last line of B from each section (to have a list of 2 x million lines at the end).
Import doesn't work since my file is too big to be read into memory.
Is there a command like scan and filter for this?
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
||||
|
You're looking for
|
|||
|
|
SetStreamPosition[], but ... why don't you just preprocess the file with any capable language for text processing (AWK, perl, sed, whatever) – belisarius Feb 11 at 14:40