Error Code From Non-Interactive FTP <sec>

Error Code From Non-Interactive FTP <sec>

Post by Silas Cheesem » Tue, 07 Mar 2000 04:00:00



How can I get an error code that indicates something went wrong with
the FTP step in a script?

For example, in the following script...

        ftp -i -n asapas4  <<HERE
        put mydata
        quit
        HERE
        echo $?

echo always prints a zero even though host asapas4 doesn't exist.

Thanks.

 
 
 

Error Code From Non-Interactive FTP <sec>

Post by tommyta » Wed, 08 Mar 2000 04:00:00


use -v option to get a detail output
redirect it to a file
grep that file for return code
e.g. 330 440 550 660........
ok?

> How can I get an error code that indicates something went wrong with
> the FTP step in a script?

> For example, in the following script...

>         ftp -i -n asapas4  <<HERE
>         put mydata
>         quit
>         HERE
>         echo $?

> echo always prints a zero even though host asapas4 doesn't exist.

> Thanks.


 
 
 

1. <><><> MOUNTING EXTENDED PARTITION <><><>

I have a 10 GB UDMA IDE drive formatted with Windows.  The first partition
is FAT32, and the second is NTFS.  I can successfully mount the first, but
not the second.  Any ideas?

Suse 7.2 on i86
the drive is mounted on /dev/hdc, and I CAN see hda1, but not hda2

2. Kernel Change Summary pre2.0.4

3. Wanted: <><><> Unix Specialist <><><>

4. printer setup

5. LILO help <><><><><><>

6. How to compile sysklogd package.

7. >>> Bandwidth Limit for FTP Server <<<

8. Scsi-Generic permission denied, even to root?

9. <Alt>+<key> = <Esc><key> ?

10. *{<><>}*Linux*Screen*Difficulties*{<><>}*

11. ===>>> cc compile error <<<===

12. << <<anyone using dyn-html?>> >>

13. ===>>> cc compile error <<<===