in reply to A Clarification
in thread Matching Multiple Lines
perl -0777 -pi.bak -e 's/^0(.*\n){1,8}//mg' file
Sure it's a lot more compact, but it suffers the same problem as my non-regex solution, is going to suck majorly for large files, and is (IMHO) less obvious about what it's actually doing, especially to those unfamiliar with Perl (YMMV).
--k.
Update: Oops, meant -0777 not -00.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Matching Multiple Lines (Re: A Clarification)
by Wally Hartshorn (Hermit) on Jan 03, 2003 at 15:16 UTC |