Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to run script through CGI? Post 302998151 by scriptor on Friday 26th of May 2017 07:47:04 AM
Old 05-26-2017
How to run script through CGI?

Hi

I have written a script and I want it to be run from web with the help of CGI. can you please guide me .

below script is working fine if run from backend but not sure how I should run through web.

Code:
 
 #!/bin/bash
 
string1=look
string2=0
string3=.sdn.dnb
 
echo -n "enter the number"
 read string2
 mystring="$string1 $string2"
ustring="$mystring$string3"
 
echo $ustring
echo $ustring >s.txt
sed 's/^\(.\{20\}\)/\1./' s.txt >p.sh
./p.sh >v.sh
cat v.sh | grep -i "Name:"

 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Run CGI As User..?

Hi, My server is set up so that all cgi scripts are run as user nobody, instead of the user's username. Now I know you can use cgi-wrappers, but someone please give me detailed information, on how to make ALL scripts run on the server to by default, run as the user? And not to run as user... (1 Reply)
Discussion started by: jason6792
1 Replies

2. Shell Programming and Scripting

CGI passing arrays/hashes to another CGI script

If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link? Hope that makes sense! :) (2 Replies)
Discussion started by: WIntellect
2 Replies

3. UNIX for Dummies Questions & Answers

Run ksh script from cgi

Hi, I'm developing a system which requires me to run a ksh script from within a cgi script. What sort of syntax will I need to do this, I'm sure it's simple but can't find out how anywhere! Thanks. (2 Replies)
Discussion started by: hodges
2 Replies

4. Shell Programming and Scripting

how to run cgi -script on Cygwin ?

All, I would like to run a cgi script in cygwin which i have installed in WinXP. My CYGWIN directory structure is /var/www/ drwxrwx---+ 2 user Users 0 Nov 23 16:24 cgi-bin drwxrwx---+ 3 user Users 0 Oct 22 17:21 htdocs drwxrwx---+ 3 user Users 0 Oct 22 17:22 icons and another... (1 Reply)
Discussion started by: jambesh
1 Replies

5. Shell Programming and Scripting

Run system command in perl cgi

Hi guys, got a problem with a perl cgi script over here. I need it to run a system command to get the status of a process. Unfortunately the process is owned by a specific user and only this user can get its status. So i tried running the command from the perl cgi with "su", but then i get the... (12 Replies)
Discussion started by: polki
12 Replies

6. Web Development

Apache, cgi script run twice when ssl, once when not ssl

I have interesting problem. https:/host/some/x.cgi - this script has run twice when I call this url But http:/host/some/x.cgi work fine, only once. Output is text/plain. If I change output format to the Content-type text/html, then both urls works fine - executed only once. (2 Replies)
Discussion started by: kshji
2 Replies

7. Homework & Coursework Questions

Run Program from Bash CGI-Script

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: This is a problem I am having with my 2 semester senior project. I have a LAMP server running Ubuntu 9.10 with... (8 Replies)
Discussion started by: JMooney5115
8 Replies

8. Shell Programming and Scripting

Run SCP in backgroung using Perl CGI

Hi I am Run Perl CGI Script. In which i am running SCP Command. But I want that command to be run into background and exit the script. But Still Web page waiting for Finish the script. I m doing like : system ("scp -r machinename:/path/to/file/for/copy/ /path/for/ destination/directory/ &");... (3 Replies)
Discussion started by: Navrattan Bansa
3 Replies

9. Shell Programming and Scripting

Run command through html+cgi in bash

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

10. UNIX for Beginners Questions & Answers

How to convert my /bin/sh script with cgi and html to run it on browser!??

Hello, I want to run this script on my CentOS 6 via browser : ________________________________________________________________________________________________ #!/bin/sh echo Username? read MY_NAME echo Provisional file name? read MY_FILE echo File NAME you want to save? read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies
shevek::args::option(3) 				     Library Functions Manual					   shevek::args::option(3)

NAME
shevek::args::option - Define an option which can be given to the program. SYNOPSIS
#include <args.hh> Public Types typedef sigc::slot1< void, bool > callback0 Callback for options without an argument. typedef sigc::slot2< void, bool, Glib::ustring const & > callback1" Callback for options with an argument. Public Member Functions option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, callback0 handle, bool *used=NULL) Option has no argument and calls a function. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, callback1 handle, Glib::ustring default_val=Glib::ustring(), bool *used=NULL) Option has mandatory argument and calls a function. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, callback0 handle0, callback1 handle1, bool *used=NULL) Option has optional argument and calls respective function. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool &var, bool value, bool *used=NULL) Set the value of a boolean variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, Glib::ustring &var, bool *used=NULL) Set the value of a string variable (utf-8). option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, std::string &var, bool *used=NULL) Set the value of a string variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, unsigned long &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, long &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, unsigned &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, int &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, unsigned short &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, short &var, bool *used=NULL) Set the value of an integer variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, float &var, bool *used=NULL) Set the value of a floating point variable. option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, bool have_default, double &var, bool *used=NULL) Set the value of a floating point variable. template<typename _T > option (char shortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, std::list< _T > &list) Friends class args Detailed Description Define an option which can be given to the program. Constructor &; Destructor Documentation template<typename _T > shevek::args::option::option (charshortopt, Glib::ustring const &longopt, Glib::ustring const &help_line, std::list< _T > &list) Fill a list of variables. An item is appended to the list for each time the option is specified. Author Generated automatically by Doxygen for libshevek from the source code. libshevek Fri May 11 2012 shevek::args::option(3)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy