How do I output a tab character (ASCII hex 0x09) on the terminal window ?
In all my experiments the tab character is changed to spaces when it appears on the terminal. E.g.
$ echo -e "xx\t\tyy" xx yy
which is not want I want since the space between
yy is filled with 14 spaces and not 2 tab characters. I tried
stty tab2 and
stty tab3, but all gives the same result.
I am using GNOME Terminal 2.16.0 and Red Hat Enterprise Linux Client release 5.9.
Background: I want to mouse-select the text on the terminal and paste into Excel. When I do this from Emacs (with 0x09 tabs between the fields) the fields end up in different columns. I like this, and want the same behavior when copy-pasting from the terminal. However, at present all the fields end up as one string in the first column. When I have spaces (0x20) between fields in Emacs, the behavior is the same as when copy-pasting from the terminal.