perl -ni.bak -e 'if ( /^0/ ) { for ( 1..7 ) { scalar <> unless eof } } else { print }' file
... but that doesn't handle cases where the 7 lines following a 0-prefixed line contain another 0-line (ie, should it the 'next 7' count reset?)
--k.
In reply to Re: Matching Multiple Lines
by Kanji
in thread Matching Multiple Lines
by Wally Hartshorn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |