title: Bash sed command issue
body: <p>I'm trying to further parse an output file I generated using an additional grep command. The code that I'm currently using is:</p>
  <pre><code>##!/bin/bash
  
  # fetches the links of the movie's imdb pages for a given actor
  
  # fullname=&quot;USER INPUT&quot;
  read -p &quot;Enter fullname: &quot; fullname
  
  if [ &quot;$fullname&quot; = &quot;Charlie Chaplin&quot; ];
  code=&quot;nm0000122&quot;
  then
  code=&quot;nm0000050&quot;
  fi
  
  
  curl &quot;https://www.imdb.com/name/$code/#actor&quot; | grep -Eo 
  'href=&quot;/title/[^&quot;]*' | sed 's#^.*href=\&quot;/#https://www.imdb.com/#g' | 
  sort -u &gt; imdb_links.txt
  
  #parses each of the link in the link text file and gets the details for 
  each of the movie. THis is followed by the cleaning process
  for i in $(cat imdb_links.txt) 
  do 
     curl $i | 
     html2text | 
     sed -n '/Sign_In/,$p'|  
     sed -n '/YOUR RATING/q;p' | 
     head -n-1 | 
     tail -n+2 
  done &gt; imdb_all.txt
  </code></pre>
  <p>The sample generated output is:</p>
  <pre><code>EN
  ⁰
      * Fully supported
      * English (United States)
      * Partially_supported
      * FranÃ§ais (Canada)
      * FranÃ§ais (France)
      * Deutsch (Deutschland)
      * à¤¹à¤¿à¤‚à¤¦à¥€ (à¤­à¤¾à¤°à¤¤)
      * Italiano (Italia)
      * PortuguÃªs (Brasil)
      * EspaÃ±ol (EspaÃ±a)
      * EspaÃ±ol (MÃ©xico)
  ****** Duck Soup ******
      * 19331933
      * Not_RatedNot Rated
      * 1h 9m
  IMDb RATING
  7.8/10
  </code></pre>
  <p>How do I change the code to further parse the output to get only the data from the title of the movie up until the imdb rating ( in this case, the line that contains the title 'Duck Soup' up until the end.</p>