Sponsored Content
Top Forums Shell Programming and Scripting Invoking Application in Shell Script Post 302858545 by Smiling Dragon on Monday 30th of September 2013 07:04:02 PM
Old 09-30-2013
If I understand correctly, you want to run a wget on a specific url on each server, and each server is in one of three environments?

If the app is always the same then it's just a matter of a 'for' loop:
Code:
for environment in `cat ListofEnvironments.txt`
do
  echo "Environment: ${environment}"
  for server in `cat ListOfServersIn${environment}.txt`
  do
    echo "  Server: ${server}"
    wget -q -O "${server}_abc.click.clear-output.txt" "http://${server}/abc.click.clear"
  done
done

Not tested, you might need some slight debug.

If you want to run in parrallel instead (faster but everything runs at once), just add a n ampersand ('&') to the end of the wget line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wrong Shell Invoking My Script On Linux

I have a shell script that does NOT have the '#!' line at the top. It is written for ksh. The shell in my passwd entry is '/usr/bin/ksh' and my SHELL env variable is '/usr/bin/ksh'. Now, here's the issue. I invoke the script on Solaris with './myprog'. This works fine. I also run the same... (3 Replies)
Discussion started by: kowrip
3 Replies

2. Shell Programming and Scripting

invoking one shell script from other

hi, i am one day old in shell scritpting. how to invoke one shell script from the other? For eg.i have two shell scripts A.sh and B.sh. Inside A.sh i need to invoke B.sh and the return code of A.sh should be the value returned by B.sh. it would be better if you provide any sample shell... (3 Replies)
Discussion started by: ajay xavier
3 Replies

3. Shell Programming and Scripting

Invoking shell script from html/jsp page

I want to invoke shell script named bubesh.sh when submit button clicked on html/jsp page.I am using an apache server and the html & shell script are in the same working directory.Please help. (2 Replies)
Discussion started by: bubeshj
2 Replies

4. Shell Programming and Scripting

Invoking Shell Script via php

list me commands to invoke a shell script from php once the submit button is clicked in the php page. Requirement is Once a submit button is clicked it should run a script that displays the outcome of the script in a html/php. Please help. Thanks in Advance, BubeshJ (2 Replies)
Discussion started by: bubeshj
2 Replies

5. Shell Programming and Scripting

returning to the parent shell after invoking a script within a script

Hi everybody, I have a script in which I'm invoking another script which runs in a subshell. after the script is executed I want to return to the parent shell as some variables are set. However i'm unable to return to my original shell as the script which i'm calling inside is invoked in... (5 Replies)
Discussion started by: gurukottur
5 Replies

6. 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

7. UNIX for Advanced & Expert Users

Invoking shell script with perl command.

Hi All, I am using the following command to invoke the shell script from a perl command. perl -i.bak -pe'BEGIN { $cmd = "/opt/coreservices/tomcat-5.5.9/bin/digest.sh -a sha"; } s/(password=")(*)/ $1.`$cmd $2|cut -d: -f2|tr -d "\n"` /e ' $CATALINA_HOME/conf/tomcat-users.xml I need... (1 Reply)
Discussion started by: nua7
1 Replies

8. Shell Programming and Scripting

Shell script..invoking command and exiting at fixed intervals

Hi, I need to write a shell script. Based on command line param to script say demode=yes Need to run an ant command for an hour(configurable) Then exit Again run the ant command all this needs to be in a loop. Thanks in advance Raj (1 Reply)
Discussion started by: rajuak12
1 Replies

9. Shell Programming and Scripting

Invoking one shell script from another unix box

Hello All, I have a shell script A which is in one unix box. Also i have a script B in another unix box. Now i'm struggling to find a way to invoke A shell script from B shell script. Is it possible to do this in any way..Request you anybody please help me in this point. Thanks in advance. (6 Replies)
Discussion started by: RSC1985
6 Replies

10. Shell Programming and Scripting

Problem invoking shell script

whats wrong here?! ________________ #!/bin/sh # FILE: clean_dirs # GOAL : To clean up directories used in Oracle processing # LANGUAGE : shell script (sh) # PARAMETERS : Input_File # 11/07/02 acri - modified to cd into the directory so it will... (7 Replies)
Discussion started by: gillraj
7 Replies
Twiggy(3pm)						User Contributed Perl Documentation					       Twiggy(3pm)

NAME
Twiggy - AnyEvent HTTP server for PSGI (like Thin) SYNOPSIS
twiggy --listen :8080 See "twiggy -h" for more details. use Twiggy::Server; my $server = Twiggy::Server->new( host => $host, port => $port, ); $server->register_service($app); AE::cv->recv; DESCRIPTION
Twiggy is a lightweight and fast HTTP server with unique features such as: PSGI Can run any PSGI applications. Fully supports psgi.nonblocking and psgi.streaming interfaces. AnyEvent This server uses AnyEvent and runs in a non-blocking event loop, so it's best to run event-driven web applications that runs I/O bound jobs or delayed responses such as long-poll, WebSocket or streaming content (server push). This software used to be called Plack::Server::AnyEvent but was renamed to Twiggy. See "NAMING" for details. Fast header parser Uses XS/C based HTTP header parser for the best performance. (optional, install the HTTP::Parser::XS module to enable it; see also Plack::HTTPParser for more information). Lightweight and Fast The memory required to run twiggy is 6MB and it can serve more than 4500 req/s with a single process on Perl 5.10 with MacBook Pro 13" late 2009. Superdaemon aware Supports Server::Starter for hot deploy and graceful restarts. To use it, instead of the usual: plackup --server Twiggy --port 8111 app.psgi install Server::Starter and use: start_server --port 8111 plackup --server Twiggy app.psgi ENVIRONMENT
The following environment variables are supported. TWIGGY_DEBUG Set to true to enable debug messages from Twiggy. NAMING
Twiggy? Because it is like Thin <http://code.macournoyer.com/thin/>, Ruby's Rack web server using EventMachine. You know, Twiggy is thin :) Why the cute name instead of more descriptive namespace? Are you on drugs? I'm sick of naming Perl software like HTTP::Server::PSGI::How::Its::Written::With::What::Module and people call it HSPHIWWWM on IRC. It's hard to say on speeches and newbies would ask questions what they stand for every day. That's crazy. This module actually includes the longer alias and an empty subclass AnyEvent::Server::PSGI for those who like to type more ::'s. It would actually help you find this software by searching for PSGI Server AnyEvent on CPAN, which i believe is a good thing. Yes, maybe I'm on drugs. We'll see. LICENSE
This module is licensed under the same terms as Perl itself. AUTHOR
Tatsuhiko Miyagawa Tokuhiro Matsuno Yuval Kogman Hideki Yamamura Daisuke Maki SEE ALSO
Plack AnyEvent Tatsumaki perl v5.14.2 2012-02-21 Twiggy(3pm)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy