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

NAME

6       tabs - set terminal tabs
7

SYNOPSIS

9       tabs [ -n| -a| -a2| -c| -c2| -c3| -f| -p| -s| -u][+m[n]] [-T type]
10
11       tabs [-T type][ +[n]] n1[,n2,...]
12
13

DESCRIPTION

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

OPTIONS

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

OPERANDS

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

STDIN

93       Not used.
94

INPUT FILES

96       None.
97

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

129       Default.
130

STDOUT

132       If standard output is a terminal, the appropriate sequence to clear and
133       set  the  tab stops may be written to standard output in an unspecified
134       format. If standard output is not a terminal, undefined results occur.
135

STDERR

137       The standard error shall be used only for diagnostic messages.
138

OUTPUT FILES

140       None.
141

EXTENDED DESCRIPTION

143       None.
144

EXIT STATUS

146       The following exit values shall be returned:
147
148        0     Successful completion.
149
150       >0     An error occurred.
151
152

CONSEQUENCES OF ERRORS

154       Default.
155
156       The following sections are informative.
157

APPLICATION USAGE

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

EXAMPLES

170       None.
171

RATIONALE

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

FUTURE DIRECTIONS

204       None.
205

SEE ALSO

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