Finding out how many spaces a tab character is expended to

D. Hugh Redelmeier hugh-pmF8o41NoarQT0dZR+AlfA at public.gmane.org
Mon Oct 29 15:32:00 UTC 2007


| From: Madison Kelly <linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org>

| However, I am not asking what *should* it expand to, but rather what does the
| current shell/terminal/user use at the point in time when the program is run.

The standard behaviour of a UNIX TTY since I've first used it (1975)
has been: tabs every 8 columns.

The program expand(1) will expand tabs for you.  It's documentation is
crap.

Also look at termios(3) where it describes TAB3 (the setting which
causes the tty driver to expand tabs).

The Linux man pages are a mess.  I don't know where this should be
documented.  Somewhere in section 4.  Existing man pages tell you to
refer to non-existant pages.  Yuck.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list