RE: AUTOMATED FTP WITH TWO LOGINS
Christina.Allain_at_frx.com
Date: 06/07/04
- Previous message: sreenath sarikonda: "Re: Software to manage StoreEdge A1000"
- Maybe in reply to: Christina.Allain_at_frx.com: "AUTOMATED FTP WITH TWO LOGINS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Christina.Allain@frx.com, sunmanagers@sunmanagers.org Date: Mon, 7 Jun 2004 10:58:22 -0400
I have resolve this problem:
Michael DeSimone made the below suggestion
"The sleep 60 is a Unix command, which you know, but you are at an ftp
prompt and that wont work. What you can do though is go to a shell to do
the sleep.
the only thing you would need to change is
sleep 60
to
!sleep 60
That should work, it does when I manually FTP".
I added ! to the sleep and it work like a charm...
Thanks for all that send me suggestions... I really appreciate all the
efforts
-----Original Message-----
From: Christina.Allain@frx.com [mailto:Christina.Allain@frx.com]
Sent: Thursday, June 03, 2004 11:53 AM
To: sunmanagers@sunmanagers.org
Subject: AUTOMATED FTP WITH TWO LOGINS
Hello Gurus,
I am writing an automated script that needs to be place in cron job. The
problem with the script is that, I need to log in twice. Does anyone have
similar script? Suggestions are welcome. Thanks in Advance
If I ran the ftp manually it looks like:
ftp -n rest.rest1.com
Connected to rest.rest1.com.
220-FTP authentication :
220
ftp> user test 13now
331-Password:
331
220 narnia FTP server (Version wu-2.6.2+Sun) ready.
ftp> user forestl ttree
331 Password required for forestl.
230 User forestl logged in. Access restrictions apply.
ftp>
When I wrote the script with single user it works fine but with two logins
it failed on the second login. Below is the script:
#!/bin/sh
ftp -n rest.rest1.com << !EOF
user test 13now
sleep 60
user forest1 ttree
cd /outbound
hash
prompt
bin
mget call_sample.txt
mget call_detail.txt
mget header.txt
quit
!EOF
Below is the error from the script:
# ./auto_ftp.scribe.ksh -v
530 Login incorrect.
Login failed.
?Invalid command
Hash mark printing on (8192 bytes/hash mark).
Interactive mode off.
call_sample.txt: No such file or directory.
can't find list of remote files, oops
call_detail.txt: No such file or directory.
can't find list of remote files, oops
header.txt: No such file or directory.
can't find list of remote files, oops
____________________________________________________________________
This e-mail and its attachments may contain Forest Laboratories, Inc.
proprietary information that is privileged, confidential or subject to
copyright belonging to Forest Laboratories, Inc. This e-mail is intended
solely for the use of the individual or entity to which it is addressed. If
you are not the intended recipient of this e-mail, or the employee or agent
responsible for delivering this e-mail to the intended recipient, you are
hereby notified that any dissemination, distribution, copying or action
taken in relation to the contents of and attachments to this e-mail is
strictly prohibited and may be unlawful. If you have received this e-mail in
error, please notify the sender immediately and permanently delete the
original and any copy of this e-mail and any printout.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
____________________________________________________________________
This e-mail and its attachments may contain Forest Laboratories, Inc.
proprietary information that is privileged, confidential or subject to
copyright belonging to Forest Laboratories, Inc. This e-mail is intended
solely for the use of the individual or entity to which it is addressed. If
you are not the intended recipient of this e-mail, or the employee or agent
responsible for delivering this e-mail to the intended recipient, you are
hereby notified that any dissemination, distribution, copying or action
taken in relation to the contents of and attachments to this e-mail is
strictly prohibited and may be unlawful. If you have received this e-mail in
error, please notify the sender immediately and permanently delete the
original and any copy of this e-mail and any printout.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
- Previous message: sreenath sarikonda: "Re: Software to manage StoreEdge A1000"
- Maybe in reply to: Christina.Allain_at_frx.com: "AUTOMATED FTP WITH TWO LOGINS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|