title: Howto use sed to remove only triple empty lines?
body: <p>Howto use sed to remove only triple empty lines? </p>
  
  <p>For example:</p>
  
  <p>MyText.txt</p>
  
  <pre>
  line1
  
  line2
  
  
  line3
  
  
  
  line4
  </pre>
  
  <p><strong>with the use of sed i want the result to look like this</strong> <br/>
  MyText.txt</p>
  
  <pre>
  line1
  
  line2
  
  
  line3
  line4
  </pre>
  
  <p>I was able to delete double empty lines with </p>
  
  <pre>
  sed -i '/^$/{
  N
  /^\n$/D
  }' MyText.txt
  </pre>
  
  <p>However my goal is to delete triple empty lines and only triple empty lines.</p>
  
  <p>Any help would be much appreciated.</p>