How to remove top and bottom lines from a file using sed, awk, etc. in 1 step I want to chop the top 13 and the last 6 lines from a file

There are several answers on unix/linux but they aren't working for me as the sed options used aren't available on osx, tac isn't available, etc.
Si I am posting here for a q&amp;a that is specific to osx

Right now I am using

$ cat myfile | tail -n+14 | sed '$d' | sed '$d' | sed '$d' | sed '$d' | sed '$d' | sed '$d'


but am looking for a shorter '1 step at the end' way.
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