What is an end-of-line character and why should I care?
When you look at a text file, you see it as a series of lines. When you edit a text file, you enter a line break by pressing the Return key. This inserts a special character into the text file at that point. This special character is known as an “end-of-line” character or a “line-break” character. This is sometimes abbreviated as “EOL”. Programs that read text files (e.g. text editors) look for these characters and display the text appropriately. (If you are curious, you can view the end-of-line characters in a text file by looking at it with a program that shows the raw contents of the file – e.g. with the command ‘hexdump -C’) However, there are three different conventions that are commonly used for indicating ends of lines in text files. They are usually known as the “Unix”, the “Macintosh”, and the “Windows” end-of-line characters. The “Unix” end-of-line character is often known as “line feed” or “newline” and indicated as “\n”.