in reply to Matching Multiple Lines
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.
|
|---|