help converting a windows text to linux text file

Discussion in 'C' started by micsom, Oct 13, 2008.

  1. micsom

    micsom New Member

    Joined:
    Oct 13, 2008
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    I*N*D*I*A*
    in a windows text file a new-line is represented by 13 10, but in linux it is represented by only 10...

    i want to delete the 13 from my text files so that it shows only 10 and is compatible with linux..

    logically my code is perfect, and i cant spot any errors...all my collegues have reviewed it too..

    but still the 13 is not getting deleted..

    please tell me how to delete the 13
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Get an editor like Editplus or slick edit which does this for you
     
  3. micsom

    micsom New Member

    Joined:
    Oct 13, 2008
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    I*N*D*I*A*
    thanx, but i did it...all it needed was a little modification...as linux pads the entire vacent 32 bit...i had to take tht into concideration..

    now my code is working fine..

    thanx for ur help
     
  4. gk123987

    gk123987 New Member

    Joined:
    Sep 9, 2008
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    0
    dos2unix filename
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice