executing shell scripts in a browser

Hi all Im a newbie in shell scripting, i found it joyous creating simple adminitrative scripts, like adding users, modify and delete, remote sw install etc, now i want to intergrate my scripts to make a simple administrative tool, how do i access the scripts via a browser is it possible??

please help

Yes, it is possible, but generally your web server must be configured to permit it.

For example, if you are using the Apache web server, it must be configured with cgi access so that files in the cgi-bin directory are treated as apps and run by the server when requested rather than as documents.

You also must modify your shell script to output the correct MIME type and html code.

Here is a simple example to output today's date:

#!/bin/ksh
DATESTR="$(/bin/date)"
echo "Content-type: text/html"
echo ""
echo "<html><head><title>Todays Date</title></head><body>"
echo "<p>Today is ${DATESTR}</p>"
echo "</body></html>"

You can call shell commands and scripts via php/perl/cgi scripts via web a server.