file_to_log (version 0.0)

You can also look at:
#! /usr/bin/ksh

###########################################################################
#
# 
# SYNTAX:  file_to_log filename
#
#                      where filename= the name of the file to be logged
#
# DESCRIPTION:  copies a file to the job log
#
# VERSION: 0.0
#
# HISTORY
#
##############################################################################


file=$1

###########################################################
# get the name of the job log and check for errors by hand
###########################################################
joblog=$($UTIL/generate_filename joblog )

###################
# debugging output
###################
if [ -n "$DEBUG" ]; then
     echo ${0##*/}: file=$file
fi

#########################
# dump the file
########################
if [ -n "$file" -a  -r $file ]; then

#     cat $file

     echo "<pre>" >>$joblog
     cat $file >>$joblog
     echo "</pre>" >>$joblog

fi


exit 0