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] [-T type]
16
17       tabs [-T type] n[[sep[+]n]...]
18

DESCRIPTION

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

OPTIONS

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

OPERANDS

82       The following operand shall be supported:
83
84       n[[sep[+]n]...]
85                 A  single  command line argument that consists of one or more
86                 tab-stop values (n) separated by a separator character  (sep)
87                 which  is either a <comma> or a <blank> character. The appli‐
88                 cation shall ensure that the  tab-stop  values  are  positive
89                 decimal integers in strictly ascending order. If any tab-stop
90                 value (except the first one) is preceded by a <plus-sign>, it
91                 is  taken  as an increment to be added to the previous value.
92                 For example, the tab lists  1,10,20,30  and  "110+10+10"  are
93                 considered to be identical.
94

STDIN

96       Not used.
97

INPUT FILES

99       None.
100

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

130       Default.
131

STDOUT

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

STDERR

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

OUTPUT FILES

141       None.
142

EXTENDED DESCRIPTION

144       None.
145

EXIT STATUS

147       The following exit values shall be returned:
148
149        0    Successful completion.
150
151       >0    An error occurred.
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  POSIX.1‐2017  has  a reduced feature list, but many of the features
182       omitted were restored as part of the XSI option 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
209       The  Base  Definitions  volume  of POSIX.1‐2017, Chapter 8, Environment
210       Variables, Section 12.2, Utility Syntax Guidelines
211
213       Portions of this text are reprinted and reproduced in  electronic  form
214       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
215       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
216       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
217       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
218       event of any discrepancy between this version and the original IEEE and
219       The Open Group Standard, the original IEEE and The Open Group  Standard
220       is  the  referee document. The original Standard can be obtained online
221       at http://www.opengroup.org/unix/online.html .
222
223       Any typographical or formatting errors that appear  in  this  page  are
224       most likely to have been introduced during the conversion of the source
225       files to man page format. To report such errors,  see  https://www.ker
226       nel.org/doc/man-pages/reporting_bugs.html .
227
228
229
230IEEE/The Open Group                  2017                             TABS(1P)
Impressum