If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Problem in FTP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-23-05, 10:57
david_v david_v is offline
Registered User
 
Join Date: Feb 2005
Posts: 1
Problem in FTP

I have script like this
var1=xyx.com

ftp $Var1 > $applLog/log.outfile 2>&1 <<!
put $file1 $file2
bye
!

if [ -s $applLog/log.outfile ]
then
echo "FTP errored!"
mailx -s"Error: $ShellName - $HostName FTP Failed" $mailList < $applLog/log.outfile
rm $applLog/log.outfile
fi

The FTP is erroring out. I got the following error message in the mail.

netout: broken pipe
Lost Connection

Can anybody throw somelight on what could be the problem? Please this is urgent.
Reply With Quote
  #2 (permalink)  
Old 02-23-05, 11:11
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
Code:
host='xyx.com'
user='userName'
passwd='userPasswd'

ftp -n "${host}" <<! > $applLog/log.outfile 2>&1
user ${user} ${passwd}
put $file1 $file2
bye
!
also... from 'man ftp':
Quote:
put local-file[ remote-file ]
Store a local file on the remote machine. If
remote-file is left unspecified, the local file
name is used after processing according to any
ntrans or nmap settings in naming the remote file.
File transfer uses the current settings for
"representation type", "file structure", and
"transfer mode".
__________________
vlad
+-----------------------+
| #include <disclaimer.h> |
+-----------------------+
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On