End-of-line
From Free net encyclopedia
←Older revision | Newer revision→
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 called fromdos and todos to convert line feeds from one format to another.
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