Results 1 to 4 of 4

Thread: Windows line endings & dual boot

  1. #1
    Join Date
    Feb 2011
    Location
    UK
    Beans
    24
    Distro
    Ubuntu 13.04 Raring Ringtail

    Windows line endings & dual boot

    I have Windows 7 & Ubuntu 12.10 on the same Laptop. With my web files I want to develop and on both OS's, but I'm sure I'll run into Windows Line ending / Unix line ending compatibility problems just using straight copy/paste..... what is best way to use same files and avoid line ending issues?

  2. #2
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    3,569
    Distro
    Xubuntu 17.04 Zesty Zapus

    Re: Windows line endings & dual boot

    Most text editors are aware of the different Unix and Windows style line endings and won't cause any problems (notepad being a notable exception on the Windows side). You can also select the style you want to use in the "save as" window when savig a file in the text editor (at least in gedit, I don't know about many others). Windows support for saving in Unix style may be worse. It's also possible to convert from one style to the other using command line utilities.

    Also see http://en.wikipedia.org/wiki/Newline...sion_utilities

    The screenshot is of the "save as" window in the linux text editor gedit, the arrow indicating the selection box for line endings.
    Attached Images Attached Images

  3. #3
    Join Date
    Feb 2011
    Location
    UK
    Beans
    24
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Windows line endings & dual boot

    Vim displays my vimrc from my windows 7 drive as ending with ^M's on every line

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    12,627
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Windows line endings & dual boot

    I created a couple of files in Wordpad and Notepad and opened them with the jed editor on a Linux box. Neither had the extraneous ^M characters. However Wordpad allows you to choose what ending you want and make that the default. The "MS-DOS" choice will add the extraneous line feeds.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •