script to ftp files

From: Andy Cohen <Andy.Cohen_at_cognex.com>
Date: Tue, 03 Apr 2001 11:08:09 -0400

Hi,

I'm trying to write a script to ftp files from an alphaserver to a sun box
that will run periodically through cron. I thought this would be easy but I
just can't get it to work. I've just about memorized the ftp man page.

Here's basically what I've tried:

echo starting ftp
ftp {sun_box}
{username}
{password}
{other ftp commands}
bye

I get errors in the log file along these lines:

starting ftp
+ ftp -ivt {sun_box}
Connected to {sun_box}.cognex.com.
220 {sun_box} FTP server (SunOS 4.1) ready.
Name (nova:oracle): 331 Password required.
530 Login incorrect.
Login failed.
221 Goodbye.
+ {username}
+ echo finished ftp
finished ftp

I tried putting all the commands into a .netrc file in $HOME on the Sun box.

What am I missing? Does anybody have a script that does this that they can
share with me? I've tried modifying the commands in all sorts of different
way all to no avail. I must be doing something incorrectly or leaving
something out.

Thanks!
Andy
Received on Tue Apr 03 2001 - 15:10:19 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT