Results 1 to 4 of 4

Thread: ftp problem

  1. #1
    Join Date
    Dec 2003
    Location
    Ogden Utah
    Posts
    34

    Unanswered: ftp problem

    I have a critical problem where during the ftp transfer one of my files is being assigned the \n character at then end of each segment. If you were to vi the file you cannot see it but when you do the od -xc < filename> I can see that the \n is at the end of each segment.

    What command during the ftp session can I use so it does not pass \n character along and or what command should I use to remove this prior to the ftp session. I have tried the sed 's/\012//'g or sed 's/012//'g on the file and it is not removing it . Do I have the right syntax??


    ftp -inv <<EOF > $FLOG_OUT
    open $HOST
    user $ID $PSW
    prompt
    lcd $out
    mput [A-Z0-9]*
    bye
    EOF
    mvilla

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    It may be defaulting to ASCII transfer, use the 'BINARY' ftp command.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Dec 2003
    Location
    Ogden Utah
    Posts
    34

    Thumbs up ftp

    Ok I took your suggestions and it worked! Wow!!!! What relief!!! Can you explain to me why?
    mvilla

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    ftp will transfer files in ASCII mode (text) and in some cases add a carriage return after each record (block), BINARY mode prevents ftp from doing any translation.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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