Format
tabs [+m[margin]] [–T term] [– number]
tabs [+m[margin]] [–T term] –t tablist
tabs [+m[margin]] [–T term] num1[,num2,…]
tabs [+m[margin]] [–T term] tabspec
Description
tabs sends
a series of characters to the standard output, designed to clear the
terminal hardware's tab stops and then set new ones. The characters
that are sent depend on the type of terminal you are using.
The
first column of your terminal screen is column 1. If you set a tab
stop at position N and then tab to that
position, the next character displayed on the screen appears in column N+1 of
the line (that is, after the tab stop).
tabs may
not be able to set the tab stops on some types of terminals. In this
situation, it issues an error message and then exits with a status
greater than zero. tabs with no arguments
sets tab stops every 8 positions.
Options
- +m[margin]
- Sets the left margin to margin. It defaults
to 10 if you do not specify a value. All tab positions are relative
to the left margin. To find the actual tab positions, you add the
value of margin to each tab position.
- –T type
- Indicates the type of terminal you have. The term argument
is a site-specific name for your terminal type.
If you do not
specify –T, tabs looks
for an environment variable named TERM and uses its value for type.
If TERM is not defined, tabs assumes a default
terminal type.
- –t tablist
- Sets tab stops as specified by tablist. tablist consists
of one or more positive decimal integers, separated by commas; the
numbers in the list should be in strictly increasing order.
If
only one number N is given, tabs are set
every N columns. If more than one number
is given, tabs are set at those column numbers.
- num1[,num2,…]
- Sets tab stops to the given numbers. The numbers in the list should
be positive decimal integers in strictly increasing order. Except
for the first number, any number in the list may be preceded by a
plus sign (+), in which case the number is considered
to be an increment on the previous setting rather than a column position.
For example,
tabs 4,8,12
tabs 4,+4,+4
are equivalent.
- tabspec
- Can be one of –a, –a2, –c, –c2, –c3, –f, –p, –s or –u and
sets tab stops at these positions:
- –a
- 1,10,16,36,72
- –a2
- 1,10,16,40,72
- –c
- 1,8,12,16,20,55
- –c2
- 1,6,10,14,49
- –c3
- 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
- –f
- 1,7,11,15,19,23
- –p
- 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
- –s
- 1,10,55
- –u
- 1,12,20,44
Each tabspec is designed
for a particular programming language. Assembler uses –a,–a2,
and –u. COBOL uses –c, –c2,
and –c3. FORTRAN, PL/I, and SNOBOL use –f, –p,
and –s, respectively.
- –number
- Sets tab stops every number positions
along the line. number must be a single-digit
decimal number. If number is zero (–0), tabs clears
all the tab stops and does not set new ones.
Environment variables
tabs uses
the following environment variables:
- TERM
- Contains the name of your terminal.
- TERMINFO
- Contains the path name of the terminfo database.
Localization
tabs uses
the following localization environment variables:
- LANG
- LC_ALL
- LC_CTYPE
- LC_MESSAGES
- NLSPATH
See Localization for more
information.
Exit values
- 0
- Successful completion
- 1
- Missing definition in the terminfo database
- 2
- Usage error
- 3
- Unknown terminal or cannot find the terminfo database
- 4
- Illegal tabs
- 5
- An error occurred
Portability
POSIX.2 User Portability Extension, X/Open Portability Guide, UNIX systems.
The +m, –t,
and tabspec arguments are all extensions
to the POSIX standard.
The –t argument
is an extension to the X/Open standard.