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 > 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
display the result of wc -l with words before and after the result melanie_pfefer UNIX for Dummies Questions & Answers 3 04-30-2008 07:33 AM
How to get a result of a cmd into variable? manchau UNIX and Linux Applications 1 03-06-2008 07:36 AM
Outputting formatted Result log file from old 30000 lines result log<help required> vikas.iet Shell Programming and Scripting 5 12-02-2007 10:43 PM
sFTP result mpang_ Shell Programming and Scripting 4 08-01-2007 10:06 PM
result of find mpang_ Shell Programming and Scripting 1 05-01-2006 11:00 PM

 
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
result of ftp

Hi friends,
I am trying to FTP a file to a different server. My script is given below

Code:
command=`ftp -n $FTP_HOST <<END_SCRIPT
user $FTP_USER $FTP_PASSWD 
lcd $TEMPFOLDER
cd $FTP_LOCATION
put $FILE
bye 
END_SCRIPT`
result="$command"
echo "result is $result"

if [ -z $result ] ; then
      echo "successfully FTPed the file"
   else
      echo "Failed to FTP the report file"
fi

}
but int the result variable what I am getting is Local directory now /home/...

And if the server name is wrong the result variable has value not connected.

can anyone help me to find out why it is like that..

Last edited by Yogesh Sawant; 05-29-2008 at 08:28 AM.. Reason: added code tags
 

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 09:42 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