Linux and modern OS X Macs end their lines with the same character, the LF. To cut down on confusion, think of OS X Macs and Linux as being interchangeable. They are interchangeable in terms of the end-of-line character. Whilse Microsoft Windows does things yet another way. Under Microsoft Windows, lines end with a combination of 2 characters – a CR followed by a LF. Symbolically, this is represented as CRLF or carriage return, line feed.
There are issues when you cooperate with others using different operating systems. So I write two Python script to resolve this issue. They also deals with BOM in text files which is automatically added by Windows platforms.
From Linux to Windows:
1 2 3 4 5 6 7
From Windows to Linux:
1 2 3 4 5 6 7 8