in reply to searching across a file then parsing
You say "The file is quite large". If that means its so big that it won't fit into memory, then I would consider using command line grep with the -A and -B options to extract out hunks of stuff that will fit into memory. That should make this "I need stuff before the match" easier.
Can you show some code of what you have so far? Its really unclear what for example "I need to back up to a known point" means.from the grep man page.... Context control: -B, --before-context=NUM print NUM lines of leading context -A, --after-context=NUM print NUM lines of trailing context
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: searching across a file then parsing
by Anonymous Monk on Feb 17, 2012 at 04:41 UTC | |
by oko1 (Deacon) on Feb 17, 2012 at 05:47 UTC | |
by newperlplayer (Initiate) on Feb 20, 2012 at 01:47 UTC | |
by Marshall (Canon) on Feb 17, 2012 at 07:51 UTC | |
by newperlplayer (Initiate) on Feb 20, 2012 at 01:40 UTC |