in reply to Re^3: looking for speed!! large file search and extract
in thread looking for speed!! large file search and extract
Assuming file1 looks likec:\> perl -n -e "print $last, $_ if /xyzdf$/ && $last; $last= /^xyzdf +/ ? $_ : ''" file1>file2
file2 will end up asabc xyzdf def hij xyzdf klm xyzdf nop qrs xyzdf
Is that what you want?xyzdf def hij xyzdf xyzdf nop qrs xyzdf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: looking for speed!! large file search and extract
by smbs (Acolyte) on Jan 13, 2005 at 09:39 UTC | |
by holli (Abbot) on Jan 13, 2005 at 10:14 UTC |