|
|
Return code on the ftp command
Hello,
I have a cron task which make a ftp automatically. I use this syntax:
ftp -n <ftp.file
content of the ftp.file :
open 192.168.0.x
user myuser password
bin
put myfile
quit
My problem, it is that even if the ftp is not able to be connected, the
return code ($?) is "0", because the last command which I send to the ftp it
is "quit".
How can I know if the file it is correctly transfered ?
Thank you!
Olivier
|
|
0
|
|
|
|
Reply
|
Olivier
|
7/13/2005 11:27:27 AM |
|
Olivier <olivier@informatiques.ch> wrote:
> How can I know if the file it is correctly transfered ?
why don't you use wget --passive-ftp?
Other than that, for your ends, a here file in the script would be more
practical methinks, as in:
ftp -n <<ENDCOMMANDS
[ftp commands go here]
ENDCOMMANDS
lg, Bernd
--
When emailing me, excuse my annoing spamfilter - it works for me.
|
|
0
|
|
|
|
Reply
|
Bernd
|
7/13/2005 12:03:38 PM
|
|
|
1 Replies
750 Views
(page loaded in 0.217 seconds)
|
|
|
|
|
|
|
|
|