Results 1 to 2 of 2

Thread: Problem in FTP

  1. #1
    Join Date
    Feb 2005
    Posts
    1

    Unanswered: 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.

  2. #2
    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':
    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> |
    +-----------------------+

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •