1tabs(1)                          User Commands                         tabs(1)
2
3
4

NAME

6       tabs - set tabs on a terminal
7

SYNOPSIS

9       tabs [-n | −−file
10             [[-code] | -a | -a2 | -c | -c2 | -c3 | -f | -p | -s | -u]]
11             q!! [+m [n]] [-T type]
12
13
14       tabs [-T type] [+ m [n]] n1 [, n2 ,...]
15
16

DESCRIPTION

18       The tabs utility sets the tab stops on the user's terminal according to
19       a tab specification, after clearing any previous settings.  The  user's
20       terminal must have remotely settable hardware tabs.
21

OPTIONS

23       The  following  options are supported. If a given flag occurs more than
24       once, the last value given takes effect:
25
26       -T type     tabs needs to know the type of terminal  in  order  to  set
27                   tabs  and  margins. type is a name listed in term(5). If no
28                   -T flag is supplied, tabs uses the value of the environment
29                   variable  TERM. If the value of TERM is NULL or TERM is not
30                   defined in the  environment  (see  environ(5)),  tabs  uses
31                   ansi+tabs  as  the terminal type to provide a sequence that
32                   will work for many terminals.
33
34
35       +m[n]       The margin argument may be  used  for  some  terminals.  It
36                   causes all tabs to be moved over n columns by making column
37                   n+1 the left margin.  If +m is given without a value of  n,
38                   the value assumed is 10. For a TermiNet, the first value in
39                   the tab list should be 1, or the margin will move even fur‐
40                   ther  to  the  right.  The normal (leftmost) margin on most
41                   terminals is obtained by +m0. The margin for most terminals
42                   is reset only when the +m flag is given explicitly.
43
44
45   Tab Specification
46       Four  types  of  tab  specification  are  accepted.  They are described
47       below:  canned,  repetitive  (-n),  arbitrary  (n1,n2,...),  and   file
48       (-file).
49
50
51       If  no  tab  specification  is given, the default value is −8, that is,
52       UNIX system ``standard'' tabs. The lowest column  number  is  1.  Note:
53       For  tabs, column 1 always refers to the leftmost column on a terminal,
54       even one whose column markers begin at 0, for example,  the  DASI  300,
55       DASI 300s, and DASI 450.
56
57   Canned -code
58       Use  one  of  the codes listed below to select a canned set of tabs. If
59       more than one code is specified, the last code  option  will  be  used.
60       The legal codes and their meanings are as follows:
61
62       -a     1,10,16,36,72 Assembler, IBM S/370, first format
63
64
65       -a2    1,10,16,40,72
66
67              Assembler, IBM S/370, second format
68
69
70       -c     1,8,12,16,20,55
71
72              COBOL, normal format
73
74
75       -c2    1,6,10,14,49
76
77              COBOL compact format (columns 1-6 omitted). Using this code, the
78              first typed character corresponds to card column  7,  one  space
79              gets  you  to column 8, and a tab reaches column 12. Files using
80              this tab setup should include a format specification as  follows
81              (see fspec(4)):
82
83                <:t-c2 m6 s66 d:>
84
85
86
87       -c3    1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
88
89              COBOL  compact format (columns 1-6 omitted), with more tabs than
90              -c2. This is the recommended format for COBOL.  The  appropriate
91              format specification is (see fspec(4)):
92
93                <:t-c3 m6 s66 d:>
94
95
96
97       -f     1,7,11,15,19,23
98
99              FORTRAN
100
101
102       -p     1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
103
104              PL/I
105
106
107       -s     1,10,55
108
109              SNOBOL
110
111
112       -u     1,12,20,44
113
114              UNIVAC 1100 Assembler
115
116
117   Repetitive
118       -n     A  repetitive specification requests tabs at columns 1+n, 1+2*n,
119              etc., where n is a single-digit decimal  number.  Of  particular
120              importance  is  the  value  8:  this  represents the UNIX system
121              ``standard'' tab setting, and is the most likely tab setting  to
122              be  found  at  a  terminal.  When  −0 is used, the tab stops are
123              cleared and no new ones are set.
124
125
126   Arbitrary
127       See OPERANDS.
128
129   File
130       -file    If the name of a file is given, tabs reads the first  line  of
131                the file, searching for a format specification (see fspec(4)).
132                If it finds one there, it sets the tab stops according to  it,
133                otherwise  it  sets them as −8. This type of specification may
134                be used to make sure that a tabbed file is printed  with  cor‐
135                rect tab settings, and would be used with the pr command:
136
137                  example% tabs - file; pr file
138
139
140
141
142
143       Tab and margin setting is performed via the standard output.
144

OPERANDS

146       The following operand is supported:
147
148       n1[,n2,...]           The  arbitrary format consists of tab-stop values
149                             separated by commas or spaces. The tab-stop  val‐
150                             ues  must be positive decimal integers in ascend‐
151                             ing order. Up to 40 numbers are allowed.  If  any
152                             number  (except  the  first one) is preceded by a
153                             plus sign, it is taken  as  an  increment  to  be
154                             added  to  the  previous value. Thus, the formats
155                             1,10,20,30, and 1,10,+10,+10 are considered iden‐
156                             tical.
157
158

EXAMPLES

160       Example 1 Using the tabs command
161
162
163       The following command is an example using -code ( canned specification)
164       to set tabs to the settings required by the IBM assembler:  columns  1,
165       10, 16, 36, 72:
166
167
168         example% tabs -a
169
170
171
172
173       The  next command is an example of using -n (repetitive specification),
174       where n is 8, causes tabs to be set  every  eighth  position:  1+(1*8),
175       1+(2*8), ... which evaluate to columns 9, 17, ...:
176
177
178         example% tabs −8
179
180
181
182
183       This  command  uses  n1,n2,... (arbitrary specification) to set tabs at
184       columns 1, 8, and 36:
185
186
187         example% tabs 1,8,36
188
189
190
191
192       The last command is an example of using -file (file  specification)  to
193       indicate  that  tabs  should  be  set  according  to  the first line of
194       $HOME/fspec.list/att4425  (see fspec(4)).
195
196
197         example% tabs -$HOME/fspec.list/att4425
198
199
200

ENVIRONMENT VARIABLES

202       See environ(5) for descriptions of the following environment  variables
203       that affect the execution of tabs: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
204       and NLSPATH.
205
206       TERM     Determine the terminal type. If  this  variable  is  unset  or
207                null,  and  if  the  -T option is not specified, terminal type
208                ansi+tabs will be used.
209
210

EXIT STATUS

212       The following exit values are returned:
213
214       0      Successful completion.
215
216
217       >0     An error occurred.
218
219

ATTRIBUTES

221       See attributes(5) for descriptions of the following attributes:
222
223
224
225
226       ┌─────────────────────────────┬─────────────────────────────┐
227       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
228       ├─────────────────────────────┼─────────────────────────────┤
229       │Availability                 │SUNWcsu                      │
230       ├─────────────────────────────┼─────────────────────────────┤
231       │CSI                          │Enabled                      │
232       ├─────────────────────────────┼─────────────────────────────┤
233       │Interface Stability          │Standard                     │
234       └─────────────────────────────┴─────────────────────────────┘
235

SEE ALSO

237       expand(1), newform(1), pr(1), stty(1), tput(1), fspec(4),  terminfo(4),
238       attributes(5), environ(5), term(5), standards(5)
239

NOTES

241       There  is  no  consistency  among different terminals regarding ways of
242       clearing tabs and setting the left margin.
243
244
245       tabs clears only 20 tabs (on terminals requiring a long sequence),  but
246       is willing to set 64.
247
248
249       The  tabspec  used with the tabs command is different from the one used
250       with the newform command. For example, tabs −8 sets every eighth  posi‐
251       tion;  whereas  newform  −i−8  indicates that tabs are set every eighth
252       position.
253
254
255
256SunOS 5.11                        1 Feb 1995                           tabs(1)
Impressum