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
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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-16-2008
dog123 dog123 is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 1
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.)
  #2 (permalink)  
Old 04-27-2009
Jerubuntu Jerubuntu is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 1
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
Closed Thread

Bookmarks

Tags
550, ftp, mget

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 10:19 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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