Hot answers tagged

4

If you opened the text files in hex editor, the difference you would see at the end of a line would be the following: Windows Line Endings: 0x0D 0x0A Unix Line Endings: 0x0A The 0x0D is the hex value for the carriage return (represented textually simply as \r). The 0x0A is the hex value for the new line character (represented textually simply as \n). ...


2

Perl to the rescue: echo one-two-three-four-five | perl -pe 's/-(.)/\u$1/g' \u upcases the following character.


2

Windows uses a carriage return followed by a newline. Unix just uses a newline. So that's one extra byte per line break.



Only top voted, non community-wiki answers of a minimum length are eligible