title: How to remove the first and last lines from a zipped file in linux
body: <p>Iam having a zipped file A.gz . How can I remove the first and last line from the file and put the rest in a new file? The command that I have tried is:</p>
  
  <pre><code>zcat A.gz|sed -i '1d;$d' &gt;B
  </code></pre>