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
11

NAME

13       tabs — set terminal tabs
14

SYNOPSIS

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

OPERANDS

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

STDIN

97       Not used.
98

INPUT FILES

100       None.
101

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

131       Default.
132

STDOUT

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

STDERR

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

OUTPUT FILES

142       None.
143

EXTENDED DESCRIPTION

145       None.
146

EXIT STATUS

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

CONSEQUENCES OF ERRORS

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

APPLICATION USAGE

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

EXAMPLES

171       None.
172

RATIONALE

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

FUTURE DIRECTIONS

205       None.
206

SEE ALSO

208       expand, stty, tput, unexpand
209
210       The  Base  Definitions  volume  of POSIX.1‐2008, Chapter 8, Environment
211       Variables, Section 12.2, Utility Syntax Guidelines
212
214       Portions of this text are reprinted and reproduced in  electronic  form
215       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
216       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
217       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
218       cal and Electronics Engineers,  Inc  and  The  Open  Group.   (This  is
219       POSIX.1-2008  with  the  2013  Technical Corrigendum 1 applied.) In the
220       event of any discrepancy between this version and the original IEEE and
221       The  Open Group Standard, the original IEEE and The Open Group Standard
222       is the referee document. The original Standard can be  obtained  online
223       at http://www.unix.org/online.html .
224
225       Any  typographical  or  formatting  errors that appear in this page are
226       most likely to have been introduced during the conversion of the source
227       files  to  man page format. To report such errors, see https://www.ker
228       nel.org/doc/man-pages/reporting_bugs.html .
229
230
231
232IEEE/The Open Group                  2013                             TABS(1P)
Impressum