Question regarding the tabs utility plus xterm in FreeBSD

Gavin Atkinson gavin at FreeBSD.org
Thu Apr 3 11:32:34 UTC 2008


On Thu, 2008-04-03 at 11:47 +0200, ash at contact.bg wrote:
> Hi everybody,
> 
> I would like to ask about the behaviour of the tabs utility in FreeBSD and xterm.
> 
> I am the coordinator for Gnome translations in Bulgarian but I have experience
> mostly with Fedora and none with FreeBSD.
> 
> Some of the translation output that goes to a terminal contains tabs. (ASCII 9 -
> Horizontal Tabs).
> 
> I found out that FreeBSD contains an implementation of the POSIX tabs utility
> which should be able to change tab positions.
> 
> I do not have access to a FreeBSD install (much less - one with xterm) and hoped
> that someone could help me find out whether it is possible to change the tabs in
> a xterm session (or the FreeBSD console) so that when a file containing tabs is
> output - the tabs will be spaced differently than the usual default (which at
> least at my machine is 8 spaces)

In an xterm, it works:

% hexdump -C tabfile
00000000  61 09 62 0a                                       |a.b.|
00000004
% cat tabfile
a       b
% tabs 6
% cat tabfile
a    b

This doesn't seem to work on a system console though, the tabs command
fails with "tabs: terminal cannot clear tabs" and a return value of 1.

Gavin


More information about the freebsd-current mailing list