09-23-2005
According to the CGI specification, POST form values will be passed to the script via the standard input. So, just read everything from the standard input (with read command?)
Yes you can develop CGI scripts in shell script but you may not find it convenient to always do all that splitting, unescape of special characters (%XX and related stuff) yourself. Perl has modules that allow you to just give the name of the parameter and then get the extracted field value immediately. A past example I posted:
https://www.unix.com/shell-programming-and-scripting/16766-perl-variable-input-via-html-post62175.html#post62175
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
AAAHHH!! I've made a perl program that you can run on a web browser. This program needs to be run everyday, and I don't want to have to run it everyday. The problem is when I try running the program from my terminal, all it does is print stuff to the terminal page (the program involves a lot of... (4 Replies)
Discussion started by: sstevens
4 Replies
2. Shell Programming and Scripting
I am currently able to use the $QUERY_STRING variable and simply cut out what I need to be assigned as variables within the shell script. However, I've been able to use the "name" value assigned within the FORM(HTML) as a variable when I use perl. Why is it that ksh doesn't read the "name" in as... (1 Reply)
Discussion started by: douknownam
1 Replies
3. Shell Programming and Scripting
Hey - I am new to cgi scripting... just writing a script to output df -k output to html page... but I cannot get the df lines on separate lines on the page, it all comes out on one line and is not very readable.. any suggestions?
My script is below - please keep in mind I am only new to it so... (1 Reply)
Discussion started by: frustrated1
1 Replies
4. Shell Programming and Scripting
Hello All,
I was trying to come up with a form using perl cgi. I then created a frame to show the output of the form. Refer below
print $display_form->start_form(-title=>"Updateuser", -style => 'font-size: 9pt; color: #202020 ; font-family: Verdana', action=>"${DOCROOT}updateUser.pl",... (4 Replies)
Discussion started by: garric
4 Replies
5. Shell Programming and Scripting
Hi,
I'm learning some simple cgi scripting. I can make a script like this,
so my browser shows "Hello World"
/www/cgi-bin/name.sh
---
#!/bin/sh
MyName=World
echo "<html> Hello $MyName </html>"
---
What I'd like is to have a separate html and script files in the cgi folder so ... (1 Reply)
Discussion started by: Performer
1 Replies
6. Web Development
hi,i hav a form in cgi perl script.this script accepts a value from user from another html form, and depending upon this value,i need to disable /enable radio buttons in cgi-perl script wen second page is displayed on executing cgi perl script.how do i do it using javascript? (0 Replies)
Discussion started by: raksha.s
0 Replies
7. Solaris
Hi
I would like to convert standard online man pages from my solaris10 system into html form to publish it on my webpage.
How this can be done in Sol10 ?
thx for help. (2 Replies)
Discussion started by: presul
2 Replies
8. Shell Programming and Scripting
I am using an html form and a php upload script to upload files.
HTML form
<table width="500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form action="upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<td>
<table... (1 Reply)
Discussion started by: anil510
1 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to write a shell script which takes parse the web form find the input field and dump the data of that field into one xml file. The form looks like,
<input type="button" id="btnSave" value="Save" onclick="saveXmlData()"/>
<form name="submitForm"... (1 Reply)
Discussion started by: jdp
1 Replies
10. Shell Programming and Scripting
Hi everyone,
I want to kill process through the web, so I create html page with single bottom that run kill command in shell script with CGI.
Here is html code:
<td><form METHOD="GET" action="http://IP:port/cgi_bin/script.cgi" > <input type="submit" value= "Submit" > <INPUT name="q"... (7 Replies)
Discussion started by: indeed_1
7 Replies
LEARN ABOUT DEBIAN
bb-findhost.cgi
BB-FINDHOST.CGI(1) General Commands Manual BB-FINDHOST.CGI(1)
NAME
bb-findhost.cgi - Xymon CGI script to find hosts
SYNOPSIS
bb-findhost.cgi?host=REGEX
DESCRIPTION
bb-findhost.cgi is invoked as a CGI script via the bb-findhost.sh CGI wrapper.
bb-findhost.cgi is passed a QUERY_STRING environment variable with the "host=REGEX" parameter. The REGEX is a Posix regular expression (see
regex(7) ) describing the hostnames to look for. A trailing wildcard is assumed on all hostnames - e.g. requesting the hostname "www" will
match any host whose name begins with "www".
It then produces a single web page, listing all of the hosts that matched any of the hostnames, with links to the Xymon webpages where they
are located.
The output page lists hosts in the order they appear in the bb-hosts(5) file.
A sample web page implementing the search facility is included with bbgen, you access it via the URL /bb/help/bb-findhost.html.
OPTIONS
--env=FILENAME
Loads the environment from FILENAME before executing the CGI.
FILES
$BBHOME/web/findhost_header
HTML header file for the generated web page
$BBHOME/web/findhost_footer
HTML footer file for the generated web page
$BBHOME/web/findhost_form
Query form displayed when bb-findhost.cgi is called with no parameters.
ENVIRONMENT VARIABLES
BBHOSTS
bb-findhost.cgi uses the BBHOSTS environment variable to find the bb-hosts file listing all known hosts and their page locations.
BBHOME Used to locate the template files for the generated web pages.
SEE ALSO
bbgen(1), bb-hosts(5), hobbitserver.cfg(5)
Xymon Version 4.2.3: 4 Feb 2009 BB-FINDHOST.CGI(1)