The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
checking exit status of a shell script kdipankar Shell Programming and Scripting 2 05-09-2006 02:08 AM
Checking Exit Status PrimeRibAndADew Shell Programming and Scripting 4 10-19-2005 04:01 PM
Sending mail, status checking videsh77 UNIX for Dummies Questions & Answers 1 01-07-2005 08:17 AM
Checking the exit status of ftp psingh UNIX for Advanced & Expert Users 1 06-04-2002 11:51 PM
Couldn't open status file /var/samba/STATUS.LCK macdonto UNIX for Dummies Questions & Answers 2 08-08-2001 09:42 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-29-2008
MeeraNair MeeraNair is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 9
checking the status of file ftp

Hi,
I m new to unix and I need a help in FTp-ing a file.

My script is given below

ftp -n <<END_SCRIPT
open $FTP_HOST
user $FTP_USER $FTP_PASSWD
lcd $TEMPFOLDER
cd $FTP_LOCATION
put $1
bye
END_SCRIPT
exit_status=$?
if [ "$exit_status" -eq "0" ] ; then
log "successfully FTPed the file"
else
log "Failed to FTP the report file"
fi


But the exit _status check doesnt seem to be working. I mean if the FTP_HOST name is given invalid, the exit_status still shows zero.

Can anyone pls tell me how else can I check for the successfult FTP of the file..
 

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 01:35 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