Sponsored Content
Special Forums UNIX and Linux Applications execute shell script using CGI for html site Post 302513712 by sheshe on Thursday 14th of April 2011 01:30:42 AM
Old 04-14-2011
execute shell script using CGI for html site

hi there
im currently in the process of creating a website for use basically within our org. im using a os x machine and installed MAMP - which includes Apache, mysql... the site will be used by techs to primarily install pkgs files onto os x devices. i would like to have buttons or hyperlinks (doesnt matter) that when the tech selects the object (e.g. a pkg file - adobe reader)... a sh script is executed that will basically install the app onto the os x device. i have placed a test shell script in the cgi-bin folder and changed ownership so its executable (chmod +x scriptname).
the test script looks like this:
#!/bin/sh
echo "content-type: text/html"
""
mkdir /users/test/thisisatestfolder


in the html page - i dont know how i would "call it" , e.g. form etc...
i dont even know if the script is set-up right as well
any help would be great
thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HTML-CGI on Unix

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

HTML form to cgi help

I wrote a script to automate user account verification against peoplesoft. Now I want to make it available to my peers via the web. It is running on Solaris. I have the form written, but am not sure how to make it work. I think the form should call a perl cgi when submitted. The cgi should call... (7 Replies)
Discussion started by: 98_1LE
7 Replies

3. Shell Programming and Scripting

html - df -k cgi script

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

cgi script to echo a html file

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

5. Shell Programming and Scripting

invoking a shell script inside cgi shell script

Hi, I have an HTML form through which I get some text as input. i need to run a shell script say script.sh inside a perl-cgi script named main_cgi.sh on the form input. I want to write the contents of the form in a file and then perform some command line operations like grep, cat on the text... (2 Replies)
Discussion started by: smriti_shridhar
2 Replies

6. Shell Programming and Scripting

How can I execute a shell script from an html link?

I want to execute a shell script when clicking on an html link. I want the output of the script to be shown on the webpage. Whats the best way to achieve this? (6 Replies)
Discussion started by: streetfighter2
6 Replies

7. Shell Programming and Scripting

How to pass data from server (CGI script) to client (html page)

Hi I know how to pass data from client side (html file) to server using CGI script (POST method). I also know how to re-create the html page from server side after receiving the data (using printf). However I want to write static pages on client side (only the structure), and only to pass... (0 Replies)
Discussion started by: naamabm
0 Replies

8. Programming

CGI Perl script to execute bash script- unable to create folder

Hi I have a bash script which takes parameters sh /tmp/gdg.sh -b BASE-NAME -n 1 -s /source/data -p /dest/data/archive -m ARC gdg.sh will scan the /source/data and will move the contents to /dest/data/archive after passing through some filters. Its working superb from bash I have... (0 Replies)
Discussion started by: rakeshkumar
0 Replies

9. UNIX for Dummies Questions & Answers

Trying to execute a script to populate all directories with index.html

Hello, I am trying to create a php file that would copy given index.html file to all directories (and subdirectories) on my site that don't have one. This is to prevent directory listings on nginx. This index.html file is placed in the /populate directory and looks like this: <html> <head>... (7 Replies)
Discussion started by: teletubby
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
Apache::AuthCookie::FAQ(3pm)				User Contributed Perl Documentation			      Apache::AuthCookie::FAQ(3pm)

NAME
Apache::AuthCookie::FAQ - Frequently Asked Questions about Apache::AuthCookie. VERSION
version 3.18 DESCRIPTION
This document serves to answer the most frequently asked questions about Apache::AuthCookie. How can I protect an entire site (/) with Apache::AuthCookie? You have to give an Apache "require" directive that applies to all requests for except for your login handler. The easiest way to do this is to override the auth handlers for your login script. For example, if your login handler is "/LOGIN", then you need to use something like the following: <Location /> AuthType My::AuthCookieHandler AuthName Whatever PerlAuthenHandler My::AuthCookieHandler->authenticate PerlAuthzHandler My::AuthCookieHandler->authorize require valid-user </Location> <Location /LOGIN> PerlAuthenHandler Apache2::Const::OK PerlAuthzHandler Apache2::Const::OK </Location> ... NAME
Apache::AuthCookie::FAQ - Frequently Asked Questions about Apache::AuthCookie. AUTHOR
Michael Schout <mschout@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2000 by Ken Williams. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. BUGS
Please report any bugs or feature requests to bug-apache-authcookie@rt.cpan.org or through the web interface at: http://rt.cpan.org/Public/Dist/Display.html?Name=Apache-AuthCookie perl v5.12.3 2011-05-09 Apache::AuthCookie::FAQ(3pm)
All times are GMT -4. The time now is 11:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy