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
BUNDLE-CONFIG(1)														  BUNDLE-CONFIG(1)

NAME
bundle-config - Set bundler configuration options SYNOPSIS
bundle config [name [value]] DESCRIPTION
This command allows you to interact with bundler's configuration system. Bundler retrieves its configuration from the local application (app/.bundle/config), environment variables, and the user's home directory (~/.bundle/config), in that order of priority. Executing bundle config with no parameters will print a list of all bundler configuration for the current bundle, and where that configura- tion was set. Executing bundle config <name> will print the value of that configuration setting, and where it was set. Executing bundle config <name> <value> will set that configuration to the value specified for all bundles executed as the current user. The configuration will be stored in ~/.bundle/config. BUILD OPTIONS
You can use bundle config to give bundler the flags to pass to the gem installer every time bundler tries to install a particular gem. A very common example, the mysql gem, requires Snow Leopard users to pass configuration flags to gem install to specify where to find the mysql_config executable. gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config Since the specific location of that executable can change from machine to machine, you can specify these flags on a per-machine basis. bundle config build.mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config After running this command, every time bundler needs to install the mysql gem, it will pass along the flags you specified. CONFIGURATION KEYS
Configuration keys in bundler have two forms: the canonical form and the environment variable form. For instance, passing the --without flag to bundle install(1) bundle-install.1.html prevents Bundler from installing certain groups speci- fied in the Gemfile(5). Bundler persists this value in app/.bundle/config so that calls to Bundler.setup do not try to find gems from the Gemfile that you didn't install. Additionally, subsequent calls to bundle install(1) bundle-install.1.html remember this setting and skip those groups. The canonical form of this configuration is "without". To convert the canonical form to the environment variable form, capitalize it, and prepend BUNDLE_. The environment variable form of "without" is BUNDLE_WITHOUT. LIST OF AVAILABLE KEYS
The following is a list of all configuration keys and their purpose. You can learn more about their operation in bundle install(1) bun- dle-install.1.html. path (BUNDLE_PATH) The location on disk to install gems. Defaults to $GEM_HOME in development and vendor/bundler when --deployment is used frozen (BUNDLE_FROZEN) Disallow changes to the Gemfile. Defaults to true when --deployment is used. without (BUNDLE_WITHOUT) A :-separated list of groups whose gems bundler should not install bin (BUNDLE_BIN) Install executables from gems in the bundle to the specified directory. Defaults to false. gemfile (BUNDLE_GEMFILE) The name of the file that bundler should use as the Gemfile. This location of this file also sets the root of the project, which is used to resolve relative paths in the Gemfile, among other things. By default, bundler will search up from the current working directory until it finds a Gemfile. In general, you should set these settings per-application by using the applicable flag to the bundle install(1) bundle-install.1.html com- mand. You can set them globally either via environment variables or bundle config, whichever is preferable for your setup. If you use both, envi- ronment variables will take preference over global settings. June 2012 BUNDLE-CONFIG(1)
All times are GMT -4. The time now is 02:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy