Hi,
Could anyone convert this script to perl for me... Having dome real problems getting it to run through apache as a shell script...
Thanks in advance!! Adam F
Solaris System Administrator
Could anyone convert this script to perl for me... Having dome real problems getting it to run through apache as a shell script...
Code:
#!/bin/ksh
#
# Simple script to run CheckProgressLog to HTML
#
WEBPAGE="/users/web/docs/adamlog.html"
function HEADER {
echo "<html>
<head>
<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=iso-8859-1\">
<meta name=\"GENERATOR\" content=\"Script generated by $PROC\">
<title>Extract from /var/log/progress.log</title>
</head>
<body bgcolor=\"#FFFFFF\">
<table border=\"0\" cellpadding=\"3\">
<tr><td width=\"25%\">
<IMG BORDER=0 SRC=\"/images/ctlogo.jpg\" WIDTH=99 HEIGHT=33 ALT=\"ux-gbbri-mk1\">
</td>
<TD WIDTH=\"75%\"><CENTER>
<H1>Extract from /var/log/progress.log</H1></CENTER></TD>
</tr></TABLE>
<table border=\"0\" cellpadding=\"3\">
<tr>
<td><b>Hostname:</b></td>
<td>`uname -n`</td>
</tr>
</table>
<HR>
<FONT SIZE=\"4\">
The following data is an extract of the last 100 lines of the
/var/log/progress.log . This report<BR>
is printed in reverse order with the youngest entry at the top
and oldest at the bottom.
<PRE>
<FONT SIZE=\"2\">"
}
function TRAILER {
echo "
</PRE>
<HR>
<P ALIGN=\"CENTER\">
<A HREF=\"./additional_reports.html\">BACK</A>
</P>
Last Updated at `date`
</body>
</html>
"
}
exec > $WEBPAGE
HEADER
/usr/local/apache/cgi-bin/log_print.ksh -L
TRAILER
Thanks in advance!! Adam F
Solaris System Administrator