The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Script runs fine on UNIX Server...Not through MSK Tool kit on Windows Server madhunk UNIX for Dummies Questions & Answers 5 01-31-2008 09:30 AM
Is it possible..when ftp session disconnect and it can automatic run again? happyv Shell Programming and Scripting 1 12-21-2006 06:34 PM
How can I tranfer an OS/ Unix (from old HD to new HD / include all files saved ) Vietnam UNIX for Dummies Questions & Answers 0 08-04-2006 08:27 PM
Force user to disconnect if no activity MarkN UNIX for Advanced & Expert Users 3 06-07-2004 11:22 AM
Connect over ssh, start something, disconnect sTorm UNIX for Dummies Questions & Answers 2 07-11-2002 11:36 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-2006
Registered User
 

Join Date: Sep 2006
Posts: 209
after server disconnect ftp tranfer......

Hi,

I have a problem for ftp file to server. If the server due to some reason (such as unstable) and disconnect my ftp script. Can the ftp keep automatic retry to connect? If yes, the files can be keep sending to host without duplicate?

HOST=hostname
USER=happyv
PASSWD=happyv

exec 4>&1
ftp -nv >&4 2>&4 |&

print -p open $HOST
print -p user $USER $PASSWD
print -p cd csl
print -p binary
print -p put CDN00173.gz
print -p put CDN00174.gz
print -p put CDN0175.gz

wait
exit 0


150 Ready to receive "/CDN00174". Mode STREAM Type BINARY.
netout: Broken pipe
421 Server is going offline. Control connection closed.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.

Last edited by happyv; 12-19-2006 at 06:16 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-20-2006
sysgate's Avatar
Unix based
 

Join Date: Nov 2006
Location: /root
Posts: 1,128
yes, something like : "if then else", or "while loop" with implementing retry
Reply With Quote
  #3 (permalink)  
Old 12-20-2006
Registered User
 

Join Date: Sep 2006
Posts: 209
Quote:
Originally Posted by sysgate
yes, something like : "if then else", or "while loop" with implementing retry
Thanks..but can you give me some idea or code for this?
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:00 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0