The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
exit status of command in a pipe line topcat8 UNIX for Dummies Questions & Answers 10 10-19-2007 04:39 AM
Getting the exit status of a remote command zoonalex Shell Programming and Scripting 1 08-23-2006 04:58 PM
how to find the exit status for the last executed command vijay.amirthraj UNIX for Dummies Questions & Answers 1 07-04-2006 10:14 PM
Exec of 'dbupgrade' returned non-zero status of '0x1' error jderocco AIX 0 10-27-2005 07:51 PM
How to find the exit status of last command in Unix? rajugp1 High Level Programming 1 09-10-2002 11:52 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-19-2003
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
Unhappy Incorrect Exit Status Returned from FTP command - Help??

I am trying to perform some error handing within a Korn sheel script whilst FTPing a file from one server to another..

The exit status is correctly set to zero, if my script connects to the other server and sends the file..

However, if for whatever reason other than a timeout the script cannot connect to the other server, the exist status is still set to zero.. which is incorrect.

Are there are better ways to check to see if FTP was sucessful or not??
  #2 (permalink)  
Old 08-20-2003
google's Avatar
google google is offline Forum Advisor  
Moderator
  
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
I had a similar issue with FTP, I ended up checking for the existence of the file(s) immediately after the FTP call. Since I could rely on the naming convention and the fact that the directory did not contain old files of a similar name this worked for me. Hope this helps.
  #3 (permalink)  
Old 08-21-2003
inquirer's Avatar
inquirer inquirer is offline
Registered User
  
 

Join Date: Aug 2001
Posts: 79
log output

log ftp transaction and check it's output

i.e.,

ftp -ivn << endftp > ftplog
open 123.123.123.123
user username password
binary
get filename
bye
endftp
  #4 (permalink)  
Old 08-22-2003
frustrated1 frustrated1 is offline
Registered User
  
 

Join Date: Aug 2003
Location: Ireland
Posts: 278
Smile

Brilliant - I wasnt sure how to keep a log of all goings on in the FTP. I have tried this and its exactly what I can use, just a bit more scripting for the error handling... Thanks a million!!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0