How to remove top and bottom lines from a file using sed, awk, etc. in 1 step
You can do it all with tail

tail -n+14 FILE | tail -r | tail -n+7 | tail -r



The first tail removes the top 13 lines
The second tail reverses the line order
The third tail removes the top 6 lines of the reversed order
The last tail reverses the line order again


or with awk (with inspiration from patrix)

awk -v n="$(wc -l FILE)" 'NR &gt; 13 &amp;&amp; NR &lt; (n-6+1)' FILE