Sponsored Content
Full Discussion: Automation script
Top Forums Shell Programming and Scripting Automation script Post 302959880 by radha254 on Saturday 7th of November 2015 04:00:32 AM
Old 11-07-2015
Quote:
Originally Posted by RudiC
As a starting point, did you consider the links given at the bottom of this page?
I did search already before posting the question . I could not find my requirement , if you understand its little tricky .

---------- Post updated at 02:30 PM ---------- Previous update was at 02:28 PM ----------

Quote:
Originally Posted by balajesuri
What you need:
1. Positional arguments - to handle arguments passed from command line
2. if-condition - if you want to do something conditionally; then use the if-block; fi
3. Commands to take in/out from load balance servers (which you already have).
4. Working email client/email server on your linux server. Most servers at work will have this. Contact your IT team if it's not available. To test if you have a working email, try the following: (mailx, mutt... are couple of commonly used mail processing systems)
Code:
echo "test email body" | mailx -s "test email subject" your_email_address@domain.com

These will help you kick start. Let us know what you come up with.
Hello -

Thanks for the start . But i know i have a working email address , but if you can help me with the actual requirement of mine that would be great . I know i have to use the case method to develop , but need some help over here .

if you feel what i mentioned is not clear , i will explain more in detail.

Thanks in advance to all .

I have a very short timeline to finish this , appreciate your quick help .
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

2. Filesystems, Disks and Memory

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

3. Shell Programming and Scripting

FTP automation script

Hi, I have got a requirement like this. a parameterized function custFtp which will take 5 i/ps and will do the following tasks. p1) server name p2) username p3) password p4) path name of the server where the file resides p5) file name pattern the function will work like this. ... (1 Reply)
Discussion started by: ani_datta
1 Replies

4. Shell Programming and Scripting

Help with Shell Script automation

can someone look into this one please... I am struck at this point. I do not know what logic to be followed here. I can go ahead with my work only, if this step is done. Please Help. I have a process X in a shell script. Once the process X is done, it generates a log file. Process X is basically... (1 Reply)
Discussion started by: ss3944
1 Replies

5. Shell Programming and Scripting

Help with Truststore automation shell script

Please close this thread. I have raise this question in appropriate thread. Thanks (0 Replies)
Discussion started by: KuldeepSinghTCS
0 Replies

6. Shell Programming and Scripting

Help with Swapinfo automation Alert script

I am new to unix scripting (HP-UX) and need to write a script for checking memory usage. I am using "ipcs -ma" and using "awk" to select specific colums and redirecting output to variable. /usr/bin/ipcs -ma | awk '{ print $5,$10,$12}' > $TMP_FILE exec < $TMP_FILE while read line; do ... (1 Reply)
Discussion started by: JamesBond007
1 Replies

7. Shell Programming and Scripting

sftp automation script not working

Hi all , can any one tell me how to code SFTP automation script ? I searched lots of forums but i didn't get any useful information:( I don't want auto Login script > like if u run the script it should automatically login into specific account and etc.. Just i want the following things... (4 Replies)
Discussion started by: sravan008
4 Replies

8. Shell Programming and Scripting

Script Automation

Hi Gurus, I have a clearcase script that i use to check in a single file at time on my clearcase server. the script is as follows setmyview settask 75098_MSI_TRILOGY_EIM cd /vobs/Trilogy_R12/custom/msieim/12.0.0/sql/ cleartool co -nc . ct mkelem -nc Filename_1.sql cp... (3 Replies)
Discussion started by: r_t_1601
3 Replies

9. Shell Programming and Scripting

awk script automation

I have the below code which calculates the time difference between src and dst from a large trace file. The code works for a given source and destination. However, I want to automate the code to go over any src and destination. The format of the source is like that: X.Y where x is always =2 and Y... (10 Replies)
Discussion started by: ENG_MOHD
10 Replies

10. Shell Programming and Scripting

Automation Script for Oracle

Hi, As a Oracle Developer, I am writing many Procedures,Functions and Packages. Facing Many optimization issue after writing these Database objects. Trying to tune it manually. Can we write any Shell/Perl/Python script to Optimize these Database objects instead of doing manual check and... (1 Reply)
Discussion started by: vasuvv
1 Replies
App::KGB::Client(3pm)					User Contributed Perl Documentation				     App::KGB::Client(3pm)

NAME
App::KGB::Client - relay commits to KGB servers SYNOPSIS
use App::KGB::Client; my $client = App::KGB::Client( <parameters> ); $client->run; DESCRIPTION
App::KGB::Client is the backend behind kgb-client(1). It handles the repository-independent parts of sending the notifications to the KGB server, kgb-bot(1). Details about extracting change from commits, branches and modules is done by sub-classes specific to the version control system in use. CONFIGURATION
The following parameters are accepted in the constructor: repo_id repository name Short repository identifier. Will be used for identifying the repository to the KGB daemon, which will also use this for IRC notifications. Mandatory. uri URI URI of the KGB server. Something like "http://some.server:port". Mandatory either as a top-level parameter or as a sub-parameter of servers array. proxy URI URI of the SOAP proxy. If not given, it is the value of the uri option, with "?session=KGB" added. password password Password for authentication to the KGB server. Mandatory either as a top-level parameter or as a sub-parameter of servers array. timeout seconds Timeout for server communication. Default is 15 seconds, as we want instant IRC and commit response. servers An array of servers, each an instance of App::KGB::Client::ServerRef class. When several servers are configured, the list is shuffled and then the servers are tried one after another until a successful request is done, or the list is exhausted, in which case an exception is thrown. When shuffling, preference is added to the last server used by the client, or by other clients (given "status_dir" is configured). br_mod_re A list of regular expressions (simple strings, not qr objects) that serve for detection of branch and module of commits. Each item from the list is tried in turn, until an item is found that matches all the paths that were modified by the commit. Regular expressions must have two captures: the first one giving the branch name, and the second one giving the module name. All the paths that were modified by the commit must resolve to the same branch and module in order for the branch and module to be transmitted to the KGB server. Example: ([^/]+)/([^/]+)/ # branch/module br_mod_re_swap 1 If you can only provide the module name in the first capture and the branch name in the second, use this option to signal the fact to kgb-client. ignore_branch When most of the development is in one branch, transmitting it to the KGB server and seeing it on ORC all the time can be annoing. Therefore, if you define ignore_branch, and a given commit is in a branch with that name, the branch name is not transmitted to the server. Module name is still transmitted. module Forces explicit module name, overriding the branch and module detection. Useful in Git-hosted sub-projects that want to share single configuration file, but still want module indication in notifications. single_line_commits off|forced|auto Request different modes of commit message processing: off No processing is done. The commit message is printed as was given, with each line in a separate IRC message, blank lines omitted. This is the only possible behaviour in versions before 1.14. forced Only the first line is sent to IRC, regardles of whether it is followed by a blank line or not. auto If the first line is followed by an empty line, only the first line is sent to IRC and the rest is ignored. This is the default since version 1.14. status_dir Specifies a directory to store information about the last server contacted successfuly. The client would touch files in that directory after successful completion of a notification with remote server. Later, when asked to do another notification, the client would start from the most recently contacted server. If that was contacted too far in the past, the information in the directory is ignored and a random server is picked, as usual. verbose Print diagnostic information. CONSTRUCTOR
new ( { initial values } ) Standard constructor with initial values in a hashref. my $c = App::KGB::Client->new( { repo_id => 'my-repo', servers => @servers, ... } ); See above. METHODS
detect_branch_and_module ( $changes ) Given a set of changes (an arrayref of App::KGB::Change objects), runs all the regular expressions as listed in br_mod_re and if a regular expression that matches all the changed paths and returns the branch and module. In case the module detected is the same as ignore_module, "undef" is returned for module. ( $branch, $module ) = $client->detect_branch_and_module($changes); shuffle_servers Returns a shuffled variant of "$self->servers". It considers the last successfuly used server by this client instance and puts it first. If there is no such server, it considers the state in "status_dir" and picks the last server noted there, if it was used in the last 5 minutes. process_commit ($commit) Processes a single commit, trying to send the changes summary to each of the servers, defined inn servers, until some server is successfuly notified. process The main processing method. Calls describe_commit and while it returns true values, gives them to process_commit. PROVIDING REPOSITORY-SPECIFIC FUNCTIONALITY App::KGB::Client is a generic class providing repository-agnostic functionality. All repository-specific methods are to be provided by classes, inheriting from App::KGB::Client. See App::KGB::Client::Subversion and App::KGB::Client::Git. Repository classes must provide the following method: dsescribe_commit This method returns an App::KGB::Commit object that represents a single commit of the repository. describe_commit is called several times, until it returns "undef". The idea is that a single App::KGB::Client run can be used to process several commits (for example if the repository is Git). If this is the case each call to describe_commit shall return information about the next commit in the series. For Subversion, this module is expected to return only one commit, subsequent calls shall return "undef". SEE ALSO
App::KGB::Client::Subversion App::KGB::Client::Git perl v5.12.4 2011-09-15 App::KGB::Client(3pm)
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy