expr available with your system? Then you can try evaluating the desired line number after you have counted the total number of lines in the file.
I created a file named
tmp containing the numbers from 1 to 20 in each line.
nlines=$(cat tmp | sed -n '$=')
cat tmp | sed -n $(expr $nlines - 9),"$nlines"p
Of course, you can use
wc -l, if available.
The command to compute the total number of lines in the file is taken from sed one liners. However, I haven't checked if it works with empty files too.
expr is not available, you can use subtract numbers in Bash as shown below:
cat tmp | sed -n $((nlines-9)),"$nlines"p