Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

what are UNIX end of line characters?

  • 03-07-2003 11:03AM
    #1
    Registered Users, Registered Users 2 Posts: 6,240 ✭✭✭


    I have a simple log file generated by a unix machine

    I want to do something in windows/dos with it, but can't though

    I am presuming it has either something to do with EOF or the new line characters

    any one help me??

    I know in windows the new line char is : Chr(10,13) line feed charriage return

    and EOF is chr(26) .. is it the same in UNIX?


Comments

  • Registered Users, Registered Users 2 Posts: 491 ✭✭flav0rflav


    DOS/Windows is CR LN, or 0x0d 0x0a, or Chr(13,10)

    Unix has just got the Linefeed (0x0a).

    Pull the log into a decent editor, I use Ultraedit. Should work fine. A good editor will also have the ability to convert it to DOS/Unix.


  • Registered Users, Registered Users 2 Posts: 15,399 ✭✭✭✭Thanx 4 The Fish


    Textpad has something similar in it and allows you to save for Unix/OS2/Winxx etc. Is a free download at downloads.com I think.


  • Registered Users, Registered Users 2 Posts: 6,240 ✭✭✭hussey


    well this is my problem

    when I am reading in the log file from a EXE, I attempt to read line by line, but instead it reads the whole file.

    if I go into DOS edit .. and if I press enter then back (as in create new line then erase it), and save the program works fine

    I am only assuming it's got to do with EOF or New line etc


  • Registered Users, Registered Users 2 Posts: 6,240 ✭✭✭hussey


    ok fixed problem .. anywhere I seen CHR$(10) I added CHR(13)

    worked fine


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 98,147 Mod ✭✭✭✭Capt'n Midnight


    It will come up as MSDos editor
    drag/drop into the send to folder in startup

    now you can right click on the file and view it... (maybe)

    (must post the fix for margins in notepad.exe - 10 bleedin years of not being able to print 80 character wide text in A4 from windows..)


  • Advertisement
Advertisement
Advertisement