There may be a more elegant way, but if, for example, I wanted to display lines 23-30 I would use
head -30 <file> | tail -8
Or more generally, in a script
typeset -i NUM_LINES=$LAST_LINE-$FIRST_LINE+1
head -$LAST_LINE|tail -$NUM_LINES
(I only just tried this code in ksh so apologies if it needs to be tweaked for bash).