you can parse the .netrc file the use a loop to go through the machines. If you have Python on your system, here's an alternative
similarly done using shell scripting, parse the netrc for machines/login/password and using loop to go through them
Hi folks. I am writing a ksh ftp script. The problem is, I need to transfer the files to several different servers. Is there a way to close a connection and move on to the next in one script or do I need to write a separate script for each one?
Thanks,
kristy (2 Replies)
I have an ftp user, which has been setup to run ftp jobs to a specific machine (different jobs). for the first job i created .netrc in the ftp users home directory and added the appropriate commands
machine FTPBOX01 login user1 password xxx
macdef init
etc
etc
get file
bye
I use the... (3 Replies)
Hi ,
I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated.
Thanks,
Ravi :) (1 Reply)
Hi ,
I need some help to finish my ftp script and i need to find the last one weeks of fles updated in the sepecific directory and see those end with Z and ftp them to my backup server. Any help is appreciated.
Thanks,
Ravi :) (1 Reply)
I have seen the script posted yesterday for automated ftp
Can we do some thing like ftp ing multiple files in one script
Example input.txt has all files names to be ftped
input.txt ------
a.tar
b.ccp
c.perl
i need to ftp all the files present in input.txt
i tried something like... (0 Replies)
Hi,
Ok, i'm trying to automate sending a DB backup from a linux box to a remote Windows PC via FTP. I can connect, send the file and create a folder, however I require that the backups be differentiated by date. Here is what my script looks like:
open *.*.*.*
user username password
lcd... (4 Replies)
Hi guys , i have 1 problem and no find what is the problem...:confused:, and .netrc is configured and correct permissions...
REMOTE="/home/user"
LISTADO=`cat /root/home/user/LISTADO.txt`
MACHINE=$(echo $i|awk 'FS="|" {print $1}')
for i in $LISTADO
do
ftp $MACHINE <<TER
passive
prompt... (2 Replies)
suppose one file comes in one sever location on MOnday.we have to write a script to automatically get that files and put it in different server location.
---------- Post updated at 10:28 AM ---------- Previous update was at 10:27 AM ----------
Please help me on this (2 Replies)
hi , i am a still beginner in unix and specially in ftp i've written this script but my admin asked me that he don't want to see in my ftp neither user neither password , so i've created .netrc file where in it i've put machine name , user and pass but still included in my script , so if someone... (19 Replies)
Hi,
I want to delete a file on the local server, while connected to remote server through FTP.
I am using the below code for this
$FTP_CMD -v -n $HOST <<*! >> $LOGFILE 2>&1
user $USER $PASSWORD
cd $DIR
... (11 Replies)