form feed,new line and carriage return
Hi,can anybody help me clarify the difference between a form feed,a new line and a carriage return ?
So appreciate. |
All terms that came from early printers:
Form Feed - Tells the printer to advance to the next page. (Back in the days when it was continuous feed paper this relied on the printer knowing the page length, AND the printer having the paper loaded properly) New Line - Moves the print head down one line. Carriage Return - Move the print head to the "home", (usually left) position. |
Hi. The wikipedia page about Newline is quite exahustive about this topic. Please, take a look at http://en.wikipedia.org/wiki/Newline.
In a few words, different systems use different line terminators and sometimes it represents a (easily managed) problem when importing text files from Windows to Linux and viceversa. Windows uses CR + LF (that is \r\n in escape sequence notation) whereas Linux uses only LF (that is \n). Some systems provide the dos2unix and unix2dos tools to make the conversion, but there are other ways to change the newline terminators using sed, perl, awk and so on. |
Quote:
|
For that matter, most of the ascii non-printing character range descends from the early days of computing, when they were used for various communication and peripheral control situations. Nowadays most of them just sit there unused, except for CR and LF, which are used as line endings, and a couple of others like null and tab.
The first 000-032 plus 177 are considered the regex [:cntrl:] character class. From man ascii: Code:
000 0 00 NUL '\0' |
The whole table is here for ref http://www.asciitable.com/
|
All times are GMT -5. The time now is 04:23 PM. |