1TABS(1P)                   POSIX Programmer's Manual                  TABS(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       tabs - set terminal tabs
13

SYNOPSIS

15       tabs [ -n| -a| -a2| -c| -c2| -c3| -f| -p| -s| -u][+m[n]] [-T type]
16
17       tabs [-T type][ +[n]] n1[,n2,...]
18
19

DESCRIPTION

21       The tabs utility shall display a series of characters that first clears
22       the  hardware  terminal tab settings and then initializes the tab stops
23       at the specified positions  and optionally adjusts the margin.
24
25       The phrase "tab-stop position N" shall be taken to mean that, from  the
26       start  of  a line of output, tabbing to position N shall cause the next
27       character output to be in the ( N+1)th column position  on  that  line.
28       The maximum number of tab stops allowed is terminal-dependent.
29
30       It need not be possible to implement tabs on certain terminals.  If the
31       terminal type obtained from the TERM environment variable or -T  option
32       represents  such a terminal, an appropriate diagnostic message shall be
33       written to standard error and tabs shall exit  with  a  status  greater
34       than zero.
35

OPTIONS

37       The  tabs  utility  shall  conform  to  the  Base Definitions volume of
38       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines,   except
39       for various extensions: the options -a2, -c2, and -c3 are multi-charac‐
40       ter.
41
42       The following options shall be supported:
43
44       -n     Specify repetitive tab stops separated by a  uniform  number  of
45              column  positions,  n, where n is a single-digit decimal number.
46              The default usage of tabs with no arguments shall be  equivalent
47              to  tabs-8.  When -0 is used, the tab stops shall be cleared and
48              no new ones set.
49
50       -a     1,10,16,36,72
51              Assembler, applicable to some mainframes.
52
53       -a2    1,10,16,40,72
54              Assembler, applicable to some mainframes.
55
56       -c     1,8,12,16,20,55
57              COBOL, normal format.
58
59       -c2    1,6,10,14,49
60              COBOL, compact format (columns 1 to 6 omitted).
61
62       -c3    1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
63              COBOL compact format (columns 1 to 6 omitted),  with  more  tabs
64              than -c2.
65
66       -f     1,7,11,15,19,23
67              FORTRAN
68
69       -p     1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
70              PL/1
71
72       -s     1,10,55
73              SNOBOL
74
75       -u     1,12,20,44
76              Assembler, applicable to some mainframes.
77
78       -T  type
79              Indicate  the  type  of terminal. If this option is not supplied
80              and the TERM variable is unset or null, an  unspecified  default
81              terminal  type  shall  be  used.  The setting of type shall take
82              precedence over the value in TERM.
83
84

OPERANDS

86       The following operand shall be supported:
87
88       n1[,n2,...]
89              A single command line argument that consists of tab-stop  values
90              separated using either commas or <blank>s. The application shall
91              ensure that the tab-stop values are positive decimal integers in
92              strictly  ascending  order. If any number (except the first one)
93              is preceded by a plus sign, it is taken as an  increment  to  be
94              added  to  the  previous  value.  For  example,  the  tab  lists
95              1,10,20,30 and 1,10,+10,+10 are considered to be identical.
96
97

STDIN

99       Not used.
100

INPUT FILES

102       None.
103

ENVIRONMENT VARIABLES

105       The following environment variables shall affect the execution of tabs:
106
107       LANG   Provide a default value for the  internationalization  variables
108              that  are  unset  or  null.  (See the Base Definitions volume of
109              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
110              ables  for the precedence of internationalization variables used
111              to determine the values of locale categories.)
112
113       LC_ALL If set to a non-empty string value, override the values  of  all
114              the other internationalization variables.
115
116       LC_CTYPE
117              Determine  the  locale  for  the  interpretation of sequences of
118              bytes of text data as characters (for  example,  single-byte  as
119              opposed to multi-byte characters in arguments).
120
121       LC_MESSAGES
122              Determine  the  locale  that should be used to affect the format
123              and contents of diagnostic messages written to standard error.
124
125       NLSPATH
126              Determine the location of message catalogs for the processing of
127              LC_MESSAGES .
128
129       TERM   Determine  the terminal type. If this variable is unset or null,
130              and if the -T option is not specified,  an  unspecified  default
131              terminal type shall be used.
132
133

ASYNCHRONOUS EVENTS

135       Default.
136

STDOUT

138       If standard output is a terminal, the appropriate sequence to clear and
139       set the tab stops may be written to standard output in  an  unspecified
140       format. If standard output is not a terminal, undefined results occur.
141

STDERR

143       The standard error shall be used only for diagnostic messages.
144

OUTPUT FILES

146       None.
147

EXTENDED DESCRIPTION

149       None.
150

EXIT STATUS

152       The following exit values shall be returned:
153
154        0     Successful completion.
155
156       >0     An error occurred.
157
158

CONSEQUENCES OF ERRORS

160       Default.
161
162       The following sections are informative.
163

APPLICATION USAGE

165       This  utility  makes  use  of the terminal's hardware tabs and the stty
166       tabs option.
167
168       This utility is not recommended for application use.
169
170       Some integrated display units might not have escape  sequences  to  set
171       tab stops, but may be set by internal system calls. On these terminals,
172       tabs works if standard output is directed to the terminal; if output is
173       directed to another file, however, tabs fails.
174

EXAMPLES

176       None.
177

RATIONALE

179       Consideration  was  given  to having the tput utility handle all of the
180       functions described in tabs. However, the  separate  tabs  utility  was
181       retained  because  it  seems more intuitive to use a command named tabs
182       than tput with a new option. The tput utility does not support  setting
183       or  clearing tabs, and no known historical version of tabs supports the
184       capability of setting arbitrary tab stops.
185
186       The System V tabs interface is very complex; the version in this volume
187       of  IEEE Std 1003.1-2001  has  a  reduced feature list, but many of the
188       features omitted were restored as XSI extensions even though  the  sup‐
189       ported languages and coding styles are primarily historical.
190
191       There  was considerable sentiment for specifying only a means of reset‐
192       ting the tabs back to a known state-presumably the "standard"  of  tabs
193       every eight positions. The following features were omitted:
194
195        * Setting  tab  stops  via  the  first  line in a file, using -- file.
196          Since even the SVID has no complete explanation of this feature,  it
197          is doubtful that it is in widespread use.
198
199       In  an  early  proposal,  a -t tablist option was added for consistency
200       with expand; this was later removed when inconsistencies with the  his‐
201       torical list of tabs were identified.
202
203       Consideration  was  given  to  adding a -p option that would output the
204       current tab settings so  that  they  could  be  saved  and  then  later
205       restored.  This  was not accepted because querying the tab stops of the
206       terminal is not a capability in historical terminfo or termcap  facili‐
207       ties and might not be supported on a wide range of terminals.
208

FUTURE DIRECTIONS

210       None.
211

SEE ALSO

213       expand, stty, tput, unexpand
214
216       Portions  of  this text are reprinted and reproduced in electronic form
217       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
218       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
219       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
220       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
221       event of any discrepancy between this version and the original IEEE and
222       The  Open Group Standard, the original IEEE and The Open Group Standard
223       is the referee document. The original Standard can be  obtained  online
224       at http://www.opengroup.org/unix/online.html .
225
226
227
228IEEE/The Open Group                  2003                             TABS(1P)
Impressum