Word Wrapping in Emails - programming question

Discussion in 'OT Technology' started by cassetti, Mar 29, 2006.

  1. cassetti

    cassetti New Member

    Joined:
    Nov 30, 2003
    Messages:
    252
    Likes Received:
    0
    Location:
    delaware
    I have a script for work that i'm trying to work with - what it does is parse these computer logs we get from customers. It does a GREAT job with logs we get directly from the boxes

    but when people forward the emails, it wordwraps the emails and screws up the system!

    I want to know - so far i can not find a system to the word wrapping - to create a program that i can manually run to unwrap the lines. How does an email client or whatever determine when to wrap lines and when not to?

    because i can't figure out the system!

    If you need an example i can show you what i mean

    thanks all!
     
  2. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Joined:
    Jan 22, 2001
    Messages:
    4,603
    Likes Received:
    0
    Location:
    South Jersey
    An example would help.
     
  3. peerk

    peerk New Member

    Joined:
    Mar 14, 2005
    Messages:
    984
    Likes Received:
    0
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Couldn't they forward the log as an attachment>
     
  5. cassetti

    cassetti New Member

    Joined:
    Nov 30, 2003
    Messages:
    252
    Likes Received:
    0
    Location:
    delaware
    Yes they do forward them as attachments - but it gets to be a pain to ask for them - here is an example of a card and some drives - it wordwraps them both:

    slot 7: Fibre Channel Host Adapter 7 (Qlogic 2100 rev. 3,
    32-bit, L-port, <UP>)
    Firmware rev: 1.19.14
    Host Loop Id: 7 FC Node Name:
    2:000:00e08b:02792c
    Cacheline size: 8 FC Packet size: 2048
    SRAM parity: No External GBIC: No
    0: NETAPP X231_ST336704FC NA32 34.0GB 520B/sect
    (3CD1TVW9000071403EL6)
    1: NETAPP X231_ST336704FC NA32 34.0GB 520B/sect
    (3CD1V9KZ00002136BH80)
    2: NETAPP X231_ST336704FC NA32 34.0GB 520B/sect
    (3CD1T57F000021357VYH)

    Here is what it should look like:

    slot 7: Fibre Channel Host Adapter 7 (Qlogic 2100 rev. 3, 32-bit)
    Firmware rev: 1.19.14
    Host Loop Id: 7 FC Node Name: 2:000:00e08b:01c5e0
    Cacheline size: 8 FC Packet size: 2048
    SRAM parity: No External GBIC: No
    0: NETAPP X232_ST173404FC NA42 68.0GB 520B/sect (3CE0CYM6000071469Y4M)
    1: NETAPP X232_ST173404FC NA42 68.0GB 520B/sect (3CE0W8M0000071451YTL)
    2: NETAPP X232_ST173404FC NA42 68.0GB 520B/sect (3CE0VLY4000071457TCK)

    These are two differant logs but still you should get the point
     
  6. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Hm, does the wrapping keep a space before the newline when it wraps? If so, it's easy enough to fix it with sed.
     
  7. cassetti

    cassetti New Member

    Joined:
    Nov 30, 2003
    Messages:
    252
    Likes Received:
    0
    Location:
    delaware
    depends on the source, i think sometimes i have seen a space after and sometimes i havn't. I have used a hex editor to try and find any change in the code, a special char or something, but nothing

    what is a SED?
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Honestly, I would find a way to get the information in ONE way and one way only rather than try to variably parse the log.

    SED = Stream Editor - it's a *nix thing.
     
  9. cassetti

    cassetti New Member

    Joined:
    Nov 30, 2003
    Messages:
    252
    Likes Received:
    0
    Location:
    delaware
    I just looked at the wordwrapping - it does not keep the space when it word wrapps the line

    and as far as having it variably parse, the problem comes in for when we are trying to attract customers. Once their systems are set up to send us the logs - its not a problem, but when we try to attract a customer - we tell them to send us a copy - and 99% of the time - they foward it and it gets wordwarpped - and i have to manually edit 40 pages of data by hand - it gets annoying
     
  10. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    K - then provide them with a tool that automatically sends it via ftp then. If you know where the log is already, simply write an ftp script that sends the log file to you (using MS's built in ftp command). Or use blat to send out the log file via your own smtp server (although this might not work as well since some ISP's block all port 25 traffic except their own).

    It makes it easier on the customer and it makes it easier on yourself.
     

Share This Page