title: Extract range of lines using sed
body: <p>I have defined two variables as follows: </p>
  
  <pre><code>var1=$(unzip -c ./*.zip | grep -n "Channel8"| cut -f1 -d":")
  var2=$(unzip -c ./*.zip | grep -n "Channel10"| cut -f1 -d":")
  </code></pre>
  
  <p>I have a very big file and I would like to extract the range of lines between <code>$var1</code> and <code>$var2</code> using sed. I am trying the following </p>
  
  <pre><code>sed -n '/"$var1","$var"2p' $(unzip -c ./*.zip)
  </code></pre>
  
  <p>But with no success. Could you give an explanation why and how to fix it? Thanks.</p>