title: I want to print the last line of group using sed
body: <p>I have file  which is shown below</p>
  
  <pre><code>Section1
      George, 1998-1995
       Peter, 1999-1990
       Simon, 1988-1960
  Section2
       Gery,  2019-2015
       John,  1984-1983
       Thomson,  1978-1965
  </code></pre>
  
  <p>When i give <strong>Section1</strong> Expected output is 
  Simon, 1988-1960</p>
  
  <p>Like this i have lots of sections. I want to achieve this with sed not using awk.</p>
  
  <p>I tried like this . But it has the line number hard coding. And also it is printing the complete range</p>
  
  <pre><code>sed -n '/Section1/,4{p}'
  </code></pre>
  
  <p>Here i could able to remove the hardcoding. But unable to print the last line. And also next section name also coming.</p>
  
  <pre><code>sed -n '/Section1/ , /Section./{p}'
  </code></pre>