I'm guessing this one isn't tough. I'm going though a book on CGI, and I typed in my script, and put it in the cgi-bin on our server, and set the permissions properly, except it only sort of works. I keep getting an error:
...ourserver/cgi-bin/pinglaura.cgi: echo: not found
Here's the script, which I've triple-checked for errors (yes, you may recognize it from Laura Lemay's book on HTML):
echo "Content-type: text/html"
echo "<TITLE>Is Laura There?</TITLE>"
ison='who | grep lemay'
if [ ! -z "$ison" ]; then
echo "<P>Laura is logged in"
echo "<P>Laura isn't logged in"
The book says something about leaving a blank line after the header, but I'm not sure what that is in a CGI script. The HTML is really just an HREF to this script. I'm running on a Windows NT box. Can anyone help? Is it because that opening line (#!/bin/sh) is UNIX?