I'm going to spend some points to re-ask this question, which teaches me a lesson: Don't grade a question without testing the answer *thoroughly* first.
Having said that, here's the question (which I've asked here before) again. I'm running a CGI script that I can't get to work. This is the script:
# ^ the above line was added as a result of the last question...
echo "Content-type: text/html"
echo "<TITLE>Is Laura There?</TITLE>"
ison='who | grep lemay'
if [ ! -z "$ison" ]; then
echo "Laura is logged in"
echo "Laura isn't logged in"
OK, this script was entered into Notepad on an NT box, and then FTP'd to a UNIX server. The HTML page is more or less a simple anchor reference to the script. When I run the script, I get the following error:
/web/beta/cgi-bin/pinglaura.cgi: echo: not found
We're running a Sun server, that should understand UNIX, right? ;) Our server software is Netscape's Fasttrack Server. What language is this script written in? Is it just straight UNIX (as opposed to PERL)?
I should note that the UNIX server logs off the user if you type "exec pinglaura.cgi."
I should ALSO note that sometimes the file comes up as "not found," even though surfing the file directory shows it's there. I have to repost it before the web browser can even see it. I've checked both the permissions AND the CGI set up.
I see what julio (the pro that answered the question the last time) was getting at when he told me to add the PATH line, but it didn't work, for some reason. Do I have to set the directory some other way?
Should the first "ison" be a scalar: "$ison?" (Although I've tried that, and it doesn't seem to work much better that way.)