End-of-line
Encyclopedia : E : EN : END : End-of-line
In computing, EOL refers to the end-of-line character or signal. It is also known as newline.
In Unix systems, the EOL character is line feed (LF, ASCII 10). In older Macintosh systems (before Mac OS X) it is carriage return (CR, ASCII 13). In MS-DOS and Microsoft Windows systems, as well as in a number of text-based Internet protocols (for example SMTP, NNTP and POP3), end-of-line is represented by both (CRLF).
Unix systems commonly have a command line interface program to convert line feeds from one format to another. On some systems, the programs are called fromdos and todos; on others, dos2unix and unix2dos; on others, u2d and d2u.
When transferring a file via the ftp protocol, the user may request that the file be translated so that end-of-line compatibility between client and server operating systems is maintained (ASCII mode). Failure to remove newline characters is a common cause of errors when uploading CGI scripts to a server running on a Unix system, reporting errors such as "bad interpreter", "500 Internal Server Error", etc.
Sed expressions to convert text files between different end-of-line formats can be found here: [Handy one-line sed scripts]
See also
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
