The information here is intended for users of dmapub.
The first line should be
#!/path/shell-name
such as
#!/bin/sh
(for shell scripts) or
#!/usr/local/bin/perl
(for perl scripts).
The first argument passed is the name of the script being called. The remaining arguments are parts of the query string.
Also, make sure that there are no problems with your shell script. You can test it out by setting the environment variables to appropriate values ( don't forget to export them) and running it. Also, you can test it by using cgiwrapd, the debug version of cgiwrap. Use it the exact same way you use cgiwrap.
The output of a CGI script has to have a header.
One of the server directives used in headers is `Content-type'. This is the MIME type of the document you are returning.
For plain text the first line of the output should be:
Content-type: text/plain
followed by a blank line. And similarly for html the first line should be:
Content-type: text/html
followed by a blank line.
If you still are having problems or questions, see the CGI FAQ.