• murtaza64
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    If this is about line endings, surely a simple shell or python script could correct them?

    • Astaroth@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

      Does windows add an extra character at the end that gets converted to new line on linux? Because the other day I were copying a script and after pasting it an extra line was added after every single line, even the empty lines.

      how it looked when I copied it:

      bla
      bla
      
      bla
      

      what it turned into:

      bla
      
      bla
      
      
      
      bla
       
      
      • candybrie@lemmy.world
        link
        fedilink
        English
        arrow-up
        11
        ·
        1 year ago

        Windows uses CR LF (carriage return, line feed), whereas Unix just uses LF. For added fun, macs use CR.

        • noughtnaut@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 year ago

          For added fun, macs use CR.

          This used to be true, for sure, but I thought this changed with OS X (which is essentially PrettyBSD) ?

          • candybrie@lemmy.world
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            You’re right. Notepad++ still lists macs as using CR for their EOL conversion tool, so I didn’t realize.