Alternatively, when you run the script you can redirect all output to a file:
[tt]/path/to/scriptname > /path/to/scriptname.out 2>&1[/tt]
Or for convenience, to save typing if the script is normally run manually, you can add a line near the beginning of the script, e.g.:
[tt]#!/bin/ksh
exec > /path/to/scriptname.out 2>&1
# rest of script...[/tt]
Annihilannic.