title: Extract lines between two line numbers in shell
body: <p>How is this possible in shell using <strong>sed</strong> or any other filter</p>
  
  <p>Lets say that i have two specific line numbers in two variables <code>$line1</code> and <code>$line2</code> and i want to extract lines between these two lines like this</p>
  
  <pre><code>cat my_file_path | command $line1 $line2
  </code></pre>
  
  <p>Example if my file is:</p>
  
  <p>1:bbb</p>
  
  <p>2:cccc</p>
  
  <p>3:dddd</p>
  
  <p>4:eeeee</p>
  
  <p>My output should be if i do:</p>
  
  <pre><code>cat my_file_path | command 1 3
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>bbb
  cccc
  </code></pre>