Dear all,
I have a bash script which looks like that:
Code:
#!/bin/sh
echo Content-type: text/html
echo
echo
echo "<HTML>"
echo "<HEAD>"
echo "</HEAD>"
echo "<BODY>"
echo "<PRE>"
file="/home/www/testcgi.html"
date1=`ls -l $file | cut -d " " -f6`
date2=`ls -l $file | cut -d " " -f7`
date3=`ls -l $file | cut -d " " -f8`
printf "Last updated : $date1 $date2 $date3\n"
echo "</PRE>"
echo "</BODY>"
echo "</HTML>"
I'd like to embed it into an HTML page.
A link like this works:
Code:
<A HREF="http://localhost/cgi-bin/html2.sh">sh</A>
But the following does not:
Code:
<script src="http://localhost/cgi-bin/html2.sh" type="text/javascript"> </script>
I know it's not javascript but this is what I read on the web ...
Any idea?
By the way is it possible to get the file name of an html page in an html script?
Thanks,
Eric.