That's plain ASCII, nothing special about it. The \x08
is ASCII code for backspace so the first one does H-backspace-HE-backspace-E... (writes every character twice) and the second does H-backspace-_ and so on. It's what you would do on a typewriter to get bold and underline.
On the other hand, to handle color, you output ASCII escape codes that are interpreted by the virtual terminal to show color, blink, position cursor and so on. It's how commands like ls
write in color:
http://en.wikipedia.org/wiki/ANSI_escape_sequences
To allow less
to preserve the ASCII escape codes, you call it as less -R
. For instance, this command displays ls
output in color in less
:
/bin/ls --color -B -F -1 | less -R
Which I have as alias to lsl
.