# Function to re-direct stdin/stderr to log file.
# Arguments $1 logfile name and path $2 ksh debug (+x or -x)

REDIRECT_OUTPUT()
{
 LOG=$1
 DEBUG_SWITCH=$2
 DIR_CHK `dirname $1` $2
 TOUCH_FILE $1 $2
 exec 2>&1
 exec 1>> $1
}
