I do something similar with .netrc (without the last 2 parameters though).
I create the ftp script (/tmp/myscript$$) on the fly, then
/bin/ftp remotemachine /tmp/myscript$$
and I don't remove /tmp/myscript$$ until ps (in the calling script which is
run by cron) shows that the ftp process has finished.
As this runs in a cron job I have output redirected in the crontab, no need
to do it in the script if you are prepared to check your mail.
One other thing you might want to do is put full paths for everything as
your cron environment might not be the same as your normal login
environment, so the paths for executables might be different.
(/bin/ftp is the path for old Solaris 2.5.1, just put in the correct path
for your installation)
There are probably lots more ways to do it, but I think the environment is
the difference in your case.
Regards,
Jill.
--
Jill Rowling, Snr Des. Eng. Unix System Administrator
Eng. Systems Dept, Aristocrat Technologies Australia
3rd Floor, 77 Dunning Ave Rosebery NSW 2018
Phone: (02) 9697-4484 Fax: (02) 9663-1412 Email: [EMAIL PROTECTED]
-Original Message-
From: Alister Waller [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 5 July 2001 9:45
To: Slug
Subject: [SLUG] FTP transfer
I am trying to set up an automatic FTP transfer each night.
I am using the .netrc config file and for testing the
contents are (names
machine 123.123.123.123 login loginname password mum macdef init
--
CONFIDENTIALITY NOTICE
--
This email is intended only to be read or used by the addressee.
The information contained in this e-mail message may be confidential
information. If you are not the intended recipient, any use, interference
with, distribution, disclosure or copying of this material is unauthorised
and prohibited. Confidentiality attached to this communication is not waived
or lost by reason of the mistaken delivery to you.
If you have received this message in error, please delete it and notify us
by return e-mail or telephone Aristocrat Technologies Australia Pty Limited
on +61 2 9413 6300.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug