![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| return code from script | mpang_ | Shell Programming and Scripting | 2 | 10-23-2007 05:50 PM |
| Capture Oracle return code in shell script | Vikas Sood | Shell Programming and Scripting | 1 | 05-22-2006 05:32 PM |
| Store return code of shell script in oracle table | sveera | Shell Programming and Scripting | 3 | 05-04-2005 01:25 PM |
| mailx in kornshell script passing return code to CA-Unicenter | Connie | UNIX for Advanced & Expert Users | 1 | 04-23-2002 08:45 AM |
| Ftp mget command ?!?!?!? (code sample) | Ganondorf | UNIX for Dummies Questions & Answers | 4 | 08-06-2001 10:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
No return code in ftp mget script
I have a automated FTP script that gets a file using mget. I am using mget because the date will change on the file frequently. The mget works, however if I incorrectly type the file (e.g. if I want to get /dog123 and I enter /dg*) I do not receive and error code from in the FTP session. The script works fine, however if I incorrectly type the location ($ftp_source) I want to receive an error saying the file was not found. Any thoughts?
I am trying to get the file /dog123 however I have purposely given the incorrect $ftp_source /dg* I would like receive an error. if [ "$ftp_type" = "mget" ] then ftp -dinv <<End_FTPSession 1>$FTPLOG 2>>$FTPLOG open $ftp_hostname user $ftp_username $ftp_password lcd $ftp_local_dir $ftp_mode #FTP mode is binary $ftp_type $ftp_source #type is mget, source is /dg* close quit End_FTPSession fi ###########LOG FILE########## 331-(----GATEWAY CONNECTED TO ftp.blah.com----) 331-(220-Microsoft FTP Service) 331-(220 IWUESSISIII (Customer FTP)) 331 Password required for test12. ---> PASS 230 User test12 logged in. Local directory now /home/dev ---> TYPE I 200 Type set to I. ---> PORT 172,25,109,67,169,33 ---> TYPE A N ---> NLST /dg* ---> TYPE I ---> QUIT 221 #Just quits, I would like to receive a 550 error (550 dg*: No such file or directory: No such file or directory.) |
|
||||
|
Did someone find any solution for this ?
I have the same problem trying to catch error from an mget in a FTP cession... |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| 550, ftp, mget |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|