672 xargs doesn't support -0
[illumos-gate.git] / usr / src / man / man1 / tabs.1
blob21543385475e2b86130eca1900f31de39dd31102
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1992, X/Open Company Limited  All Rights Reserved  Portions Copyright (c) 1995, Sun Microsystems, Inc.  All Rights Reserved
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\"  This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH TABS 1 "Feb 1, 1995"
11 .SH NAME
12 tabs \- set tabs on a terminal
13 .SH SYNOPSIS
14 .LP
15 .nf
16 \fBtabs\fR [\fB-n\fR | \(mi\(mi\fIfile\fR
17       [[\fB-code\fR] | \fB-a\fR | \fB-a2\fR | \fB-c\fR | \fB-c2\fR | \fB-c3\fR | \fB-f\fR | \fB-p\fR | \fB-s\fR | \fB-u\fR]]
18       q!! [+m [\fIn\fR]] [\fB-T\fR \fItype\fR]
19 .fi
21 .LP
22 .nf
23 \fBtabs\fR [\fB-T\fR \fItype\fR] [+ \fIm\fR [\fIn\fR]] \fIn1\fR [, \fIn2\fR ,...]
24 .fi
26 .SH DESCRIPTION
27 .sp
28 .LP
29 The \fBtabs\fR utility sets the tab stops on the user's terminal according to a
30 tab specification, after clearing any previous settings. The user's terminal
31 must have remotely settable hardware tabs.
32 .SH OPTIONS
33 .sp
34 .LP
35 The following options are supported. If a given flag occurs more than once, the
36 last value given takes effect:
37 .sp
38 .ne 2
39 .na
40 \fB\fB-T\fR \fItype\fR \fR
41 .ad
42 .RS 12n
43 \fBtabs\fR needs to know the type of terminal in order to set tabs and margins.
44 \fItype\fR is a name listed in \fBterm\fR(5). If no \fB-T\fR flag is supplied,
45 \fBtabs\fR uses the value of the environment variable \fBTERM\fR. If the value
46 of \fBTERM\fR is \fINULL\fR or \fBTERM\fR is not defined in the environment
47 (see \fBenviron\fR(5)), \fBtabs\fR uses \fBansi+tabs\fR as the terminal type to
48 provide a sequence that will work for many terminals.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fB+m[\fR\fIn\fR\fB]\fR \fR
55 .ad
56 .RS 12n
57 The margin argument may be used for some terminals. It causes all tabs to be
58 moved over \fIn\fR columns by making column \fIn\fR\fB+1\fR the left margin.
59 If \fB+m\fR is given without a value of \fIn\fR, the value assumed is \fB10\fR.
60 For a TermiNet, the first value in the tab list should be \fB1\fR, or the
61 margin will move even further to the right. The normal (leftmost) margin on
62 most terminals is obtained by \fB+m0\fR. The margin for most terminals is reset
63 only when the \fB+m\fR flag is given explicitly.
64 .RE
66 .SS "Tab Specification"
67 .sp
68 .LP
69 Four types of tab specification are accepted.  They are described below:
70 canned, repetitive (\fB-\fR\fIn\fR), arbitrary (\fIn1,n2,...\fR), and file
71 (\fB-\fR\fIfile\fR).
72 .sp
73 .LP
74 If no tab specification is given, the default value is \fB\(mi8\fR, that is,
75 UNIX system ``standard'' tabs. The lowest column number is \fB1\fR. Note:  For
76 \fBtabs\fR, column 1 always refers to the leftmost column on a terminal, even
77 one whose column markers begin at 0, for example, the DASI 300, DASI 300s, and
78 DASI 450.
79 .SS "\fICanned\fR \fB-code\fR"
80 .sp
81 .LP
82 Use one of the codes listed below to select a canned set of tabs. If more than
83 one code is specified, the last code option will be used.  The legal codes and
84 their meanings are as follows:
85 .sp
86 .ne 2
87 .na
88 \fB\fB-a\fR\fR
89 .ad
90 .RS 7n
91 \fB1,10,16,36,72\fR Assembler, IBM S/370, first format
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fB-a2\fR\fR
98 .ad
99 .RS 7n
100 \fB1,10,16,40,72\fR
102 Assembler, IBM S/370, second format
106 .ne 2
108 \fB\fB-c\fR\fR
110 .RS 7n
111 \fB1,8,12,16,20,55\fR
113 COBOL, normal format
117 .ne 2
119 \fB\fB-c2\fR\fR
121 .RS 7n
122 \fB1,6,10,14,49\fR
124 COBOL compact format (columns 1-6 omitted). Using this code, the first typed
125 character corresponds to card column 7, one space gets you to column 8, and a
126 tab reaches column 12. Files using this tab setup should include a format
127 specification as follows (see \fBfspec\fR(4)):
129 .in +2
131 <:t\fB-c2\fR \|m6 \|s66 \|d:>
133 .in -2
138 .ne 2
140 \fB\fB-c3\fR\fR
142 .RS 7n
143 \fB1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67\fR
145 COBOL compact format (columns 1-6 omitted), with more tabs than
146 \fB\fR\fB-c2\fR\fB\&.\fR This is the recommended format for COBOL. The
147 appropriate format specification is (see \fBfspec\fR(4)):
149 .in +2
151 <:t\fB-c3\fR \|m6 \|s66 \|d:>
153 .in -2
158 .ne 2
160 \fB\fB-f\fR\fR
162 .RS 7n
163 \fB1,7,11,15,19,23\fR
165 FORTRAN
169 .ne 2
171 \fB\fB-p\fR\fR
173 .RS 7n
174 \fB1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61\fR
176 PL/I
180 .ne 2
182 \fB\fB-s\fR\fR
184 .RS 7n
185 \fB1,10,55\fR
187 SNOBOL
191 .ne 2
193 \fB\fB-u\fR\fR
195 .RS 7n
196 \fB1,12,20,44\fR
198 UNIVAC 1100 Assembler
201 .SS "\fIRepetitive\fR"
203 .ne 2
205 \fB\fB-\fR\fIn\fR \fR
207 .RS 7n
208 A \fIrepetitive\fR specification requests tabs at columns 1+\fIn\fR,
209 1+2*\fIn\fR, etc., where \fIn\fR is a single-digit decimal number. Of
210 particular importance is the value \fB8\fR: this represents the UNIX system
211 ``standard'' tab setting, and is the most likely tab setting to be found at a
212 terminal. When \fB\(mi0\fR is used, the tab stops are cleared and no new ones
213 are set.
216 .SS "\fIArbitrary\fR"
219 See OPERANDS.
220 .SS "\fIFile\fR"
222 .ne 2
224 \fB\fB-\fR\fIfile\fR\fR
226 .RS 9n
227 If the name of a \fIfile\fR is given, \fBtabs\fR reads the first line of the
228 file, searching for a format specification (see \fBfspec\fR(4)). If it finds
229 one there, it sets the tab stops according to it, otherwise it sets them as
230 \fB\(mi8\fR\&. This type of specification may be used to make sure that a
231 tabbed file is printed with correct tab settings, and would be used with the
232 \fBpr\fR command:
234 .in +2
236 example% \fBtabs -\fI file\fR; pr\fI file\fR\fR
238 .in -2
245 Tab and margin setting is performed via the standard output.
246 .SH OPERANDS
249 The following operand is supported:
251 .ne 2
253 \fB\fIn1\fR[,\fIn2\fR,\|.\|.\|.] \fR
255 .RS 22n
256 The \fIarbitrary\fR format consists of tab-stop values separated by commas or
257 spaces. The tab-stop values must be positive decimal integers in ascending
258 order. Up to 40 numbers are allowed. If any number (except the first one) is
259 preceded by a plus sign, it is taken as an increment to be added to the
260 previous value. Thus, the formats \fB1\fR,\fB10\fR,\fB20\fR,\fB30\fR, and
261 \fB1\fR,\fB10\fR,\fB+10\fR,\fB+10\fR are considered identical.
264 .SH EXAMPLES
266 \fBExample 1 \fRUsing the tabs command
269 The following command is an example using \fB-code\fR ( \fIcanned\fR
270 specification) to set tabs to the settings required by the IBM assembler:
271 columns 1, 10, 16, 36, 72:
274 .in +2
276 example% \fBtabs -a\fR
278 .in -2
283 The next command is an example of using \fB-n\fR (\fIrepetitive\fR
284 specification), where \fIn\fR is \fB8\fR, causes tabs to be set every eighth
285 position: 1+(1*8), 1+(2*8), .\|.\|.\| which evaluate to columns 9,
286 17, .\|.\|.\|:
289 .in +2
291 example% \fBtabs \(mi8\fR
293 .in -2
298 This command uses \fIn1\fR,\fIn2\fR,.\|.\|.\| (\fIarbitrary\fR specification)
299 to set tabs at columns 1, 8, and 36:
302 .in +2
304 example% \fBtabs 1,8,36\fR
306 .in -2
311 The last command is an example of using \fI-file\fR (\fBfile\fR specification)
312 to indicate that tabs should be set according to the first line of
313 $\fBHOME\fR/fspec.list/att4425  (see \fBfspec\fR(4)).
316 .in +2
318 example% \fBtabs -$HOME/fspec.list/att4425\fR
320 .in -2
323 .SH ENVIRONMENT VARIABLES
326 See \fBenviron\fR(5) for descriptions of the following environment variables
327 that affect the execution of \fBtabs\fR: \fBLANG\fR, \fBLC_ALL\fR,
328 \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
330 .ne 2
332 \fB\fBTERM\fR \fR
334 .RS 9n
335 Determine the terminal type. If this variable is unset or null, and if the
336 \fB-T\fR option is not specified, terminal type \fBansi+tabs\fR will be used.
339 .SH EXIT STATUS
342 The following exit values are returned:
344 .ne 2
346 \fB\fB0\fR \fR
348 .RS 7n
349 Successful completion.
353 .ne 2
355 \fB\fB>0\fR \fR
357 .RS 7n
358 An error occurred.
361 .SH ATTRIBUTES
364 See \fBattributes\fR(5) for descriptions of the following attributes:
369 box;
370 c | c
371 l | l .
372 ATTRIBUTE TYPE  ATTRIBUTE VALUE
374 CSI     Enabled
376 Interface Stability     Standard
379 .SH SEE ALSO
382 \fBexpand\fR(1), \fBnewform\fR(1), \fBpr\fR(1), \fBstty\fR(1), \fBtput\fR(1),
383 \fBfspec\fR(4), \fBterminfo\fR(4), \fBattributes\fR(5), \fBenviron\fR(5),
384 \fBterm\fR(5), \fBstandards\fR(5)
385 .SH NOTES
388 There is no consistency among different terminals regarding ways of clearing
389 tabs and setting the left margin.
392 \fBtabs\fR clears only \fB20\fR tabs (on terminals requiring a long sequence),
393 but is willing to set \fB64\fR.
396 The \fItabspec\fR used with the \fBtabs\fR command is different from the one
397 used with the \fBnewform\fR command. For example, \fBtabs\fR \fB\(mi8\fR sets
398 every eighth position; whereas \fBnewform\fR \fB\(mii\(mi8\fR indicates that
399 tabs are set every eighth position.