help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

octave script in cgi-bin


From: Mike Miller
Subject: octave script in cgi-bin
Date: Sun, 10 Oct 1999 21:55:00 -0500 (CDT)

I'm trying to set things up on my system so that users of a web page can
execute an octave script and get the output in their browser window.
Sounds simple enough (but I don't know anything!) :-)

Apparently I am able to put perl scripts or sh scripts in the cgi-bin of
my Apache web server and the stdout is piped to a web page.  There seems
to be a trick to it.  If the stdout from sh doesn't start with some empty
lines, it seems to fail.  For example, this shell script..

#!/usr/bin/sh
cal

when put in the appropriate directory on my computer, makes it so that the
following URL

http://taxa.psyc.missouri.edu/cgi-bin/cal

attempts to execute the script, but all I get is an error.  But the
following script works.

#!/usr/bin/sh
echo ''
cal

(note the additional 'echo' line).  Anyway, I want Octave to be able to do
this sort of thing for me.  Here's a simple example:

#!/usr/local/bin/octave -qf
rand(3)

This script will produce a 3-by-3 matrix of random values when called from
the command line, but it gives an error when called by the web server.
Forcing it to produce some blank lines didn't seem to help.

So what's the trick?  How can I make octave pump the output to the web
server?


I apologize if this is a FAQ, but I couldn't get to the octave web pages
for some reason (either the server is down or there is a network problem).

Regards,

Mike

-- 
Michael B. Miller
University of Missouri--Columbia
http://taxa.psyc.missouri.edu/~mbmiller/



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]