Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2004
    Posts
    46

    Unanswered: Bad data after sending mail

    Hi ,

    I am not getting the right file when i tried to send a file using mail commands

    Actual file I am trying to send is
    SourceRecordCount|TargetRecordCount|SourceDebitsTo tal|TargetDebitsTotal|SourceCreditsTotal|TargetCre ditsTotal
    250778|262498|89526460118.70|97344532806.30|895264 60118.70|97344532806.30


    but when i look at the sent mail output file is like below with
    SourceRecordCount|TargetRecordCount|SourceDebitsTo tal|TargetDebitsTotal|SourceCreditsTotal|TargetCre ditsTotal
    250778|262498|89526460118.70|97344532806.30|895264 60118.70|97344532806.3
    250778|262498|0

    But my question is why I am getting extra lines in the bold in the mail....
    I have checked for any unprintable characters or special characters in the file but i don't see any... this is only happening with the first line...

    Can anyone help me figureout what I am doing wrong...

    Thanks
    Mark.

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    What commands are you using?
    Have you tried sending data as attachment?
    Code:
    uuencode MyData File1.txt|mailx -s"Data file attached" foo@bar.com
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jun 2004
    Posts
    46
    I am using mailx command to send the mail

    mailx -s "Hi" mark@ford.com < file.txt

    Thanks
    Mark.

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    Somehow mailx is interpreting the pipe (|) character and 'wrapping' the line.
    You can either use another character (like ~ or ^), or send the file as attachment.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down

    Somehow mailx is interpreting the pipe (|) character and 'wrapping' the line.
    You can either use another character (like ~ or ^), or send the file as attachment.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  6. #6
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Wink

    I found out your problem, you have space characters here: |SourceDebitsTo tal| and here: |895264 60118.70|
    Disregard the previous posting about the 'pipe' character.
    Last edited by LKBrwn_DBA; 11-12-04 at 09:54.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  7. #7
    Join Date
    Jun 2004
    Posts
    46
    Thanks for your reply,

    But as you said, space is not causing the issue, when i removed the space and tried the same command, somehow i am getting the same wrong output as i was getting previously,.... i couldn't figurout what else is causing the problem....

    when i copy the same line in the file as 10 additional lines, i am getting error for first line but remaining 10 lines data looks good..

    Thanks
    Mark.

  8. #8
    Join Date
    Jun 2004
    Posts
    46
    Thanks, Brown...

    You are right when i changed delimeter to ','... it is working ...Thanks

    But still Can you explain why'|' is interpreted as wrapping the line..

    Thanks
    Mark.

  9. #9
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713
    Quote Originally Posted by markjason
    You are right when i changed delimeter to ','... it is working ...Thanks
    But still Can you explain why'|' is interpreted as wrapping the line..
    Cannot explain, first time I see this behavior. Seems to be it somehow recognizes the 'pipe' and if the line is more than a certain amount of characters, it splits the line and generates some 'key' value for the rest of the slices.

    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
  •