Sponsored Content
Top Forums Shell Programming and Scripting Automated scp using shell & expect Post 302984571 by veeresh_15 on Thursday 27th of October 2016 11:05:42 AM
Old 10-27-2016
Thanks Robin & Rudi for your comments. I will think of using key generation technique to do this. But still want to know from where these junk characters are coming.

Rudi,

Here is the input file. I generate this file by querying a DB table.

Code:
/FS1/DB1/ETL_STAGING_A01.dbf
/FS1/DB1/KALIDO_IN_D03.dbf 
/FS2/DB1/ETL_STAGING_A02.dbf 
/FS2/DB1/KALIDO_IN_D04.dbf 
/FS1/DB1/ETL_STAGING_A03.dbf 
/FS1/DB1/KALIDO_IN_D05.dbf 
/FS2/DB1/ETL_STAGING_A04.dbf 
/FS2/DB1/KALIDO_IN_D06.dbf 
/FS1/DB1/ETL_STAGING_A05.dbf

Regards,
Veeresham


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 10-27-2016 at 12:12 PM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

scp automated script

Hi Unix gurus, I am trying to create a script to automate the copying of files daily from one server to another using the scp command. --> #!/bin/ksh KEY="$HOME/.ssh/SSHKEY" if ;then echo "Private key not found at $KEY" >> $LOGFILE echo "* Please create it with \"ssh-keygen -t dsa\" *"... (5 Replies)
Discussion started by: gholdbhurg
5 Replies

2. Solaris

SCP & SSH errors

Hi I am trying to scp a file between to servers (both on same subnet and can see each other). However, whenever I try I get the following error: ld.so.1: ssh: fatal: relocation error: file /usr/local/bin/ssh: symbol EVP_CIPHER_CTX_key_length: referenced symbol not found lost connection I... (4 Replies)
Discussion started by: skewbie
4 Replies

3. Shell Programming and Scripting

How to put scp in background inside expect

Gents, I have a wrapper script passing couple of information to an expect script mainly responsible for spawning scp and providing the password (which is transmitted down from the main script). the main script prepare the transfer to couple of servers, idea being to transfer the files in... (3 Replies)
Discussion started by: luc3004
3 Replies

4. UNIX for Advanced & Expert Users

Automated SCP script passing password to preserve source file timestamp

Hi My requirement is i want to copy files from remote server to the local server and also i need to preserve the timestamp of the remote file. By using scp -p , it is working fine in the interactive call but it is not preserving he file timestamp when i use it in the non interactive scp call... (1 Reply)
Discussion started by: skumar75
1 Replies

5. Shell Programming and Scripting

Automated SCP from a job?

Hi all - I have a script which runs on the OS level, but refuses to run as a cron or as an Oracle job. The Script is pretty straight forward: #!/bin/bash username="MyUsername" host="Remote.server" path="Remote.directory/files/*.*" password="MyPassword" expect -c " spawn /usr/bin/scp... (3 Replies)
Discussion started by: danimaltex
3 Replies

6. Shell Programming and Scripting

scp not working in expect script

Hi All, I run the scp command in shell prompt without issue, but when on expect script as below: #!/usr/bin/expect spawn scp /var/spool/sms/failed.tar.gz abc@10.10.12.2:/home/abc expect "abc@10.10.12.2's password: " send "abcfef\r" exit 0 It looks not working at all and the... (3 Replies)
Discussion started by: elingtey
3 Replies

7. AIX

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (2 Replies)
Discussion started by: thisissouvik
2 Replies

8. Shell Programming and Scripting

How to use 'expect' to pass UID & Password to a "for loop" in shell script?

Friends, Need someone's help in helping me with the below requirement for a script: > For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details < I know, this is possible through expect programming in a simple... (14 Replies)
Discussion started by: thisissouvik
14 Replies

9. Shell Programming and Scripting

scp script getting timed out with expect

Hi, I have an expect script where in i am trying to scp a folder but it is getting timed out. Any help will be appreciated. (I don't have the option for sharing keys) expect -c 2> /dev/null " spawn scp -r -o NumberOfPasswordPrompts=1 -o StrictHostKeyChecking=no root@10.10.10.10:test_dir... (2 Replies)
Discussion started by: temp_user
2 Replies

10. Shell Programming and Scripting

Using Expect and scp. Not moving directories

An Expect script using scp to copy directories is not moving the subdirectories as wanted. The directory structure is: computerA (user 'test') /home/test/parentDir/subdir1 /home/test/parentDir/subdir2 and I want them copied to computerB (user 'archive') /home/archive/subdir1... (1 Reply)
Discussion started by: nohj ordpl
1 Replies
XBase::SDBM(3pm)					User Contributed Perl Documentation					  XBase::SDBM(3pm)

NAME
XBase::SDBM - SDBM index support for dbf DESCRIPTION
When developing the XBase.pm/DBD::XBase module, I was trying to support as many existing variants of file formats as possible. The module thus accepts wide range of dbf files and their versions from various producers. But with index files, the task is much, much harder. First, there is little or no documentation of index files formats, so the development is based on reverse engineering. None if the index formats support is finalized. That made it hard to integrate them into one consistent API. That is why I decided to write my own index support, and as I wanted to avoid inventing yet another way of storing records in pages and similar things, I used SDBM. It comes with Perl, so you already have it, and it's proven and it works. Now, SDBM is a module that aims at other task than to do supporting indexes for a dbf. But equality tests are fast with it and I have creted a structure in each index file to enable "walk" though the index file. VERSION
1.02 AVAILABLE FROM
http://www.adelton.com/perl/DBD-XBase/ AUTHOR
(c) 2001--2011 Jan Pazdziora. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-03-03 XBase::SDBM(3pm)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy