controlling screen display

How can I control the screen output when trying to read a large file onto the screen x number of lines at a time. I'm trying to use this is a bourne shell script. I want to display 10 lines of a file, pause the screen so that a user can read the file, and then display the next 10 lines of the file, pause .....etc. I have tried:
using head and tail in a loop. There also seems to be a problem controlling the exact placement of the file contents. I've used tput cup r c; the screen placement varies. Any thoughts will be appreciated!

Use more -10 - read the man page on more and if your system has it man less.

Perderabo posted an excellent script to do just that. He points out that head / tail is very inefficient, so his works without repeated disk reads...

Check it out here:

Good stuff!

That's not quite what I had in mind. I need to show only 10 lines at a time. more and / or less seem to write to the whole screen and then scroll by the specified number of lines. I can't even erase a portion of the screen with this method?

the original question was: how can a put 10 lines from a log file on the screen at one time, pause the screen and prompt the user to press some key to see the next 10 lines.

If you do it from a script, then you could clear the screen, show the first ten lines, prompt for a return from the user and then clear the screen and show the next 10 lines. You would have to create a script utilizing some of these commands:
head and/or tail
read
clear

There would be some thought needed for the logic of this but it isn't too hard.

If you are wanting to control exact positions within a screen, then you would have to insure of the terminal type and issue escape sequences to control the cursor position.

How about:
page -n10 filename

Thanks for the input guys! This is what I ended up doing at it seems to work, still need to test it a little more.

scr_fill=`cat filename | wc -l`
LC=10
LnCnt=$LC

while [ $scr_fill -gt $LC ]
do
tput clear
tput cup 0 0
head -$LnCnt filename | tail -$LC
tput cup 20 20
echo "Press enter for the next screen"
read junk
LnCnt=`expr $LnCnt + $LC`
scr_fill=`expr $scr_fill - $LC`
done
tput clear
tput cup 0 0
head -$LnCnt filename | tail -$LC