Hmmmm.....Off the top of my head, you might have the best luck by redirecting all output to the pager at the beginning of the output commands ......This can be accomplished a couple of different ways: one, by redirecting everything to a different file descriptor, or just simply redirecting the output straight to the pager, depending on what else the script is doing.........The canonical way is to use an extra file descriptor, like so....
Code:
#! /bin/bash
<script setup commands, such as variable assignments, etc>
exec 3>&1 # Setting FD1 (stdin) to FD3
exec 1 | less # piping FD1 to less
<commands for output to pager go here>
exec 1>&3 # resetting stdin back to FD1
exec 3>&- # closing off FD3
<rest of script>
exit 0
HTH

---thegeekster