Re: Ftp script condition code 0

From: Bill Verzal (Bill_Verzal@BCBSIL.COM)
Date: Wed Feb 12 2003 - 15:37:44 EST


ftp does not handle result codes well.

You are correct.

BV
--------------------------------------------------------------------------------------------------------
Bill Verzal
Technical Consultant
Forbes Technical Consulting
(312) 653-3684
bill_verzal@bcbsil.com
billverzal@imcingular.com (Pager)
888-428-4025 (Pager)
MailStop: 27.202B

"Yard, John" <syjy0@SMTP.AIS.UCLA.EDU>
Sent by: "IBM AIX Discussion List" <aix-l@Princeton.EDU>
02/12/2003 02:17 PM
Please respond to "IBM AIX Discussion List"

        To: aix-l@Princeton.EDU
        cc:
        Subject: Ftp script condition code 0

When I run ftp scripts I check for the condition code;
but I have found , that when the ftp fails -
say I don't connect - the condition code from the ftp
is always condition code zero.

Why does this occur ? Is there a circumvention to this issue ?

Here is a sample ( simplified ) script :

ftp -i -v clients.dns.name < my_ftp_parms

if [ $? != 0 ]
     then
     echo "myclient zip ftp error" >> /my/ftp5950/oztcmo.log
     mail -s "UNZIP ERRORS" sgly0@ucop.ais.ucla.edu < /my/ftp5950/oztcmo.log
     exit 0
fi

John Yard
UCLA Administrative Information Systems
Distributed Platforms
Unix/Win2000 Admin/Sybase/Oracle/SqlSrvr/Networking
310-825-1725

**********
The information contained in this communication is confidential, private, proprietary, or otherwise privileged and is intended only for the use of the addressee. Unauthorized use, disclosure, distribution or copying is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately at (312)653-6000 in Illinois; (972)766-6900 in Texas; or (800)835-8699 in New Mexico.
**********



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:35 EDT