Sponsored Content
Full Discussion: Automate scp between servers
Top Forums Shell Programming and Scripting Automate scp between servers Post 302801537 by Revansidhu on Thursday 2nd of May 2013 06:55:41 AM
Old 05-02-2013
try this one!
Code:
lineNumber=1
lstMaxLine=`wc -l serverdetailsfile.txt | awk '{print $1}'`
while [ $lineNumber -le $lstMaxLine ]
	do
	S_server=`head -$lineNumber serverdetailsfile.txt | tail -1|awk '{print $1}'` 
	S_path=`head -$lineNumber serverdetailsfile.txt | tail -1|awk '{print $2}'`
	d_server=`head -$lineNumber serverdetailsfile.txt | tail -1|awk '{print $3}'` 
	d_path=`head -$lineNumber serverdetailsfile.txt | tail -1|awk '{print $4}'`
	
	lineNumber=`expr $lineNumber + 1`
	scp Username@$S_server:$S_path* Username@$d_server:$d_path.
	done

i think this will work!
This User Gave Thanks to Revansidhu For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

automate useradd

Hi I wounder if some one knows how to make a script to automate user adding? When i am starting the script it will add user like 04pers00 and fowllowing untill that i'm quit. The password will be a standard password typed in the file. I'm unsing Sun solaris 9 on Intel Sorry for my... (1 Reply)
Discussion started by: steffa
1 Replies

2. Shell Programming and Scripting

scp between 2 servers - invoked at 3rd server

I have a couple of servers that can't see each other and need to copy files from one to the other. I try to invoke scp from a 3rd server that can see both servers - get error msgs that are cryptic. from server C I can do scp user@serverA:~/file . scp file user@serverB:~ but if I try to... (2 Replies)
Discussion started by: bigjohn-nj
2 Replies

3. Shell Programming and Scripting

Automate FTP

Hi, Currently, i am using sftp manully to transfer files between two secure servers. Can anyone provide me a sample shell script which can automate the sftp process? (11 Replies)
Discussion started by: borncrazy
11 Replies

4. UNIX for Dummies Questions & Answers

Unable to scp/sftp between two servers

I have four servers that for all intents and purposes are the same (I have the same profile on all four), North, South, Brooklyn & Queens. I have a script that scp's a file from Queens to brooklyn, and it runs just fine. I tried to replicate the script on South, to transfer a file to North, and... (1 Reply)
Discussion started by: DeCoTwc
1 Replies

5. Shell Programming and Scripting

Scp between two servers

Is there a way to connect betwwen two servers A and B without using prompting for a password ..... I am writing a script which includes picking up files from and puts them to B. using mget .. To make the script fully automable I am looking for a passwordless authentication... Any... (2 Replies)
Discussion started by: ultimatix
2 Replies

6. Shell Programming and Scripting

Script to SCP a file to multiple servers

Hi All, I am a total noob to the Unix world, and i hope to learn a lot from this wonderful community. Here's my first post and question , i am trying to SCP a file to multiple servers (multiple destinations) through this little script : #!/bin/ksh # copy files # File to be copied... (7 Replies)
Discussion started by: rdlover
7 Replies

7. UNIX for Advanced & Expert Users

Script that can Automate Printer adding task in HP-UX servers

I want to make a script to automate printer adding task.My inputs are like Printer name : xyz Port number :9001 I should write a script to make the Printer adding task will be automated. Like in manually adding task we are doing through hppi or jetadmin tools. ---------- Post updated at... (2 Replies)
Discussion started by: AnilKPatnaik
2 Replies

8. Shell Programming and Scripting

automate scp faster

Hi, I am currently using a shell script to transfer file to another machine non-stop using scp . below is my code : #!/bin/bash while : do scp /home/pc3/Desktop/b.html pc1@192.168.1.102:/home/pc1/Documents done After it transfer the first image, it needs 5 seconds to send the second... (9 Replies)
Discussion started by: Ericyue
9 Replies

9. Shell Programming and Scripting

scp without password between two servers

Hello Folks, I have two linux server accounts server1 and server2 From the terminal if I say this command, scp /source/folder/from/server1/unix.txt user@server2.com:/destination/folder/ Then it prompts for the password user@server2.com's password: I enter my password and then it... (1 Reply)
Discussion started by: jacobs.smith
1 Replies

10. UNIX for Beginners Questions & Answers

Automate splitting of files , scp files as each split completes and combine files on target server

i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
QXmlLocator(3qt)														  QXmlLocator(3qt)

NAME
QXmlLocator - The XML handler classes with information about the parsing position within a file SYNOPSIS
All the functions in this class are reentrant when Qt is built with thread support.</p> #include <qxml.h> Public Members QXmlLocator () virtual ~QXmlLocator () virtual int columnNumber () = 0 virtual int lineNumber () = 0 DESCRIPTION
The QXmlLocator class provides the XML handler classes with information about the parsing position within a file. The reader reports a QXmlLocator to the content handler before it starts to parse the document. This is done with the QXmlContentHandler::setDocumentLocator() function. The handler classes can now use this locator to get the position (lineNumber() and columnNumber()) that the reader has reached. See also XML. MEMBER FUNCTION DOCUMENTATION
QXmlLocator::QXmlLocator () Constructor. QXmlLocator::~QXmlLocator () [virtual] Destructor. int QXmlLocator::columnNumber () [pure virtual] Returns the column number (starting at 1) or -1 if there is no column number available. int QXmlLocator::lineNumber () [pure virtual] Returns the line number (starting at 1) or -1 if there is no line number available. SEE ALSO
http://doc.trolltech.com/qxmllocator.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qxmllocator.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QXmlLocator(3qt)
All times are GMT -4. The time now is 04:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy