title: Fetching multiple occurences of text in shell
body: <p>I have a file like:</p>
  
  <p>HEADING-1</p>
  
  <p>abc </p>
  
  <p>def</p>
  
  <p>ghi</p>
  
  <p>END</p>
  
  <p>HEADING-2</p>
  
  <p>uvw</p>
  
  <p>xyz</p>
  
  <p>END</p>
  
  <p>Now, i want all text between HEADING- and END for every occurence. How can i do that? I tried using grep and sed but it came only for single occurence. I want this output in separate files for each HEADING- and END occurence</p>