title: sed not consistently stripping blocks from log file
body: <p>There is a log file generated by Oracle RMAN that I'd like to pass through with sed and strip out positive validation results.</p>
  
  <p>The original log file can be viewed here:
  <a href="https://pastebin.com/XhEEs9e9" rel="nofollow noreferrer">https://pastebin.com/XhEEs9e9</a></p>
  
  <pre><code>This log file consists of many sections like this:
  File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  ---- ------ -------------- ------------ --------------- ----------
  58   OK     0              7964         1280000         8964120502
    File Name: /oracle/PRD/sapdata3/sr3_55/sr3.data55
    Block Type Blocks Failing Blocks Processed
    ---------- -------------- ----------------
    Data       0              322650          
    Index      0              232975          
    Other      0              716411          
  </code></pre>
  
  <p>What I am trying to achieve is to have sed strip out the blocks where all the corrupt blocks and failing blocks are '0'.</p>
  
  <p>To accomplish this, I have crafted out a rather long sed command like so:</p>
  
  <pre><code>/tmp/rman.log | /usr/gnu/bin/sed -E '/^File[[:space:]]*Status[[:space:]]*Marked[[:space:]]*Corrupt[[:space:]]*Empty[[:space:]]*Blocks[[:space:]]*Blocks[[:space:]]*Examined[[:space:]]*High SCN$/{N;N;/\n[[:digit:]]*[[:space:]]*OK[[:space:]]*[[:digit:]]*[[:space:]]*[[:digit:]]*[[:space:]]*[[:digit:]]*[[:space:]]*[[:digit:]]*$/{N;N;N;N;/\n[[:space:]]*Data[[:space:]]*0[[:space:]]*[[:digit:]]*[[:space:]]*$/{N;/\n[[:space:]]*Index[[:space:]]*0[[:space:]]*[[:digit:]]*[[:space:]]*$/{N;/\n[[:space:]]*Other[[:space:]]*0[[:space:]]*[[:digit:]]*[[:space:]]*$/d}}}}'
  </code></pre>
  
  <p>The command appeared to work, some of the blocks are stripped out from the original log file, however some of the blocks are left behind.</p>
  
  <p>The problem is, I can't tell why... :(</p>
  
  <p>The filtered log can be seen here:
  <a href="https://pastebin.com/rKgfj28B" rel="nofollow noreferrer">https://pastebin.com/rKgfj28B</a></p>
  
  <p>Am I missing something with my command? The ones left behind have "0"s for corrupt blocks and failing blocks too, but somehow they just don't match.</p>