$ sed -n '3,7p' filename
The above command will print lines 3 thu 7 only!
Try the command on a file with the following content:
line 1line 2line 3line 4line 5line 6line 7line 8line 9line 10