When you select a part of what you see in the vi editor, you don't want to copy all the escape sequences that have been used to produce that output. Now, all X11 terminal emulators and a few other non-X11 ones like GNU screen let you select areas of the screen for copy paste. Those sequences are typically used by visual applications like vi, lynx, mutt, dialog where text is written at arbitrary positions on the screen. There are other escape sequences to erase (fill with blank) parts of lines or regions of the screen, etc.
There are more escape sequences to move n characters left, right, up, down or at any position on the screen.
On most modern terminals, it's actually a sequence of characters:, [, C. So the pendant of \b had to be something newer than ASCII. Now in modern terminals, SPC moves to the right and also erases (writes a space character as you'd expect). The SPC character, in original tele-typewriters would move the cursor to the right, while backspace ( \b) would move it to the left.
#How to get putty to show newline characters driver#
On terminals that don't support tabulation, the terminal driver can be configured to translate those tabs to sequences of spaces. If they are sent whilst the cursor is in third position in a line that contains xxxxyyyyzzzz, that will result in: xxfooyyybarz So if those characters are sent to a terminal with tab stops every 8 columns whilst the cursor is at the start of an empty line, that will result in: foo bar tells the terminal to move the cursor to the next tab stop (which on most terminals are 8 positions apart by default but can also be configured to be set anywhere) without filling the gap with blanks. So the terminal driver in the kernel will actually translate it to (return to the left edge of the screen), (cursor down) ( stty onlcr generally on by default). (aka newline) is the line delimiter in Unix text, but for terminals, it just feeds a line (move the cursor one position down). Upon receiving those characters, the terminal will display a corresponding glyph and move the cursor one column to the right, unless it's already reached the right edge of the screen (paper in original tele-typewriters)), in which case it may feed a line and return to the left edge of the screen (wrap) or just discard the character depending on the terminal and how it's been configured. In printf '%s\t%s\n' foo bar, printf does output foobar.į, o, b, a and r are single-width graphical characters.