CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Creating a text file from a form and run shell script

 



ballu
New User

Apr 1, 2013, 12:17 PM

Post #1 of 2 (449 views)
Creating a text file from a form and run shell script Can't Post

Hi All,

I am new to web programming and kindly need your help.


I need to create a form with around five fields and multiple hidden variables.
You can use only one regular and one hidden variables for example. on a click of the submit button on the form, a text fille will be created and will upload that file on the remote server through scp (I have keys setup).

Now lets say form has one field server name. User enters server name (myservername) and clicks submits. I need the server name and the hidden variable on that text file like below.


blah_blah_blah=myservername
blah_blah_blah=myhiddenvariable

once the input text file (myinput.txt) is created and coppied to the remote server dir on the click of the submit. I need another button on that form like runscript. On a click of a run script I need to run a shell script on the remote server which uses myinput.txt as input.

on remote server:

/dir/myscript.sh /tmp/myinput.txt

I need to display the output generated by the shell script on the web page

Thanks in advance for all the help.


ballu.


FishMonger
Veteran / Moderator

Apr 1, 2013, 4:19 PM

Post #2 of 2 (439 views)
Re: [ballu] Creating a text file from a form and run shell script [In reply to] Can't Post

What have you tried thus far?

What part of the process do you not know how to do or is giving you trouble?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives