EPIC
Web Utilities -- COVER
Small examples
It's expected that the most common use will be that
the script outputs HTML; example:
#!/bin/csh
echo "Content-type: text/html"
echo ""
echo "<H1>This is a tiny forms responder</H1>"
echo "<P><B>Whatever</B> HTML you want...<BR>"
echo "usually dependent upon script arguments..."
|
|
Of course, it could output a GIF image:
#!/bin/sh
echo "Content-type: image/gif"
echo ""
cat /webstuff/logo/$1.gif
Or redirect the browser to another file location:
#!/bin/csh
if ( "$1" == "help" ) then
echo "Location: help.html"
else
echo "Location: gifs/$1.gif"
endif
echo ""
Note -- The blank line after the header(s) is
required by the CGI standard!