1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
|
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved
.TH "TABS" P 2003 POSIX
.\" tabs
.SH NAME
tabs \- set terminal tabs
.SH SYNOPSIS
.LP
\fBtabs\fP \fB[\fP \fB-\fP\fIn\fP\fB| -a| -a2| -c| -c2| -c3| -f| -p|
-s|
-u\fP\fB][\fP\fB+m\fP\fB[\fP\fIn\fP\fB]]\fP \fB\fP\fB[\fP\fB-T\fP
\fItype\fP\fB]\fP\fB
.br
.sp
tabs\fP \fB[\fP\fB-T\fP \fItype\fP\fB][\fP \fB+\fP\fB[\fP\fIn\fP\fB]]\fP
\fIn1\fP\fB[\fP\fB,\fP\fIn2\fP\fB,...\fP\fB]\fP\fB\fP
\fB
.br
\fP
.SH DESCRIPTION
.LP
The \fItabs\fP utility shall display a series of characters that first
clears the hardware terminal tab settings and then
initializes the tab stops at the specified positions \ and optionally
adjusts the margin.
.LP
The phrase "tab-stop position \fIN\fP" shall be taken to mean that,
from the start of a line of output, tabbing to position
\fIN\fP shall cause the next character output to be in the ( \fIN\fP+1)th
column position on that line. The maximum number of tab
stops allowed is terminal-dependent.
.LP
It need not be possible to implement \fItabs\fP on certain terminals.
If the terminal type obtained from the \fITERM\fP
environment variable or \fB-T\fP option represents such a terminal,
an appropriate diagnostic message shall be written to standard
error and \fItabs\fP shall exit with a status greater than zero.
.SH OPTIONS
.LP
The \fItabs\fP utility shall conform to the Base Definitions volume
of IEEE\ Std\ 1003.1-2001, Section 12.2, Utility Syntax Guidelines,
\ except for
various extensions: the options \fB-a2\fP, \fB-c2\fP, and \fB-c3\fP
are multi-character.
.LP
The following options shall be supported:
.TP 7
\fB-\fP\fIn\fP
Specify repetitive tab stops separated by a uniform number of column
positions, \fIn\fP, where \fIn\fP is a single-digit
decimal number. The default usage of \fItabs\fP with no arguments
shall be equivalent to \fBtabs\fP-8. When \fB-0\fP is used,
the tab stops shall be cleared and no new ones set.
.TP 7
\fB-a\fP
1,10,16,36,72
.br
Assembler, applicable to some mainframes.
.TP 7
\fB-a2\fP
1,10,16,40,72
.br
Assembler, applicable to some mainframes.
.TP 7
\fB-c\fP
1,8,12,16,20,55
.br
COBOL, normal format.
.TP 7
\fB-c2\fP
1,6,10,14,49
.br
COBOL, compact format (columns 1 to 6 omitted).
.TP 7
\fB-c3\fP
1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
.br
COBOL compact format (columns 1 to 6 omitted), with more tabs than
\fB-c2\fP.
.TP 7
\fB-f\fP
1,7,11,15,19,23
.br
FORTRAN
.TP 7
\fB-p\fP
1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
.br
PL/1
.TP 7
\fB-s\fP
1,10,55
.br
SNOBOL
.TP 7
\fB-u\fP
1,12,20,44
.br
Assembler, applicable to some mainframes.
.TP 7
\fB-T\ \fP \fItype\fP
Indicate the type of terminal. If this option is not supplied and
the \fITERM\fP variable is unset or null, an unspecified
default terminal type shall be used. The setting of \fItype\fP shall
take precedence over the value in \fITERM .\fP
.sp
.SH OPERANDS
.LP
The following operand shall be supported:
.TP 7
\fIn1\fP\fB[\fP,\fIn2\fP,...\fB]\fP
A single command line argument that consists of tab-stop values separated
using either commas or <blank>s. The
application shall ensure that the tab-stop values are positive decimal
integers in strictly ascending order. If any number (except
the first one) is preceded by a plus sign, it is taken as an increment
to be added to the previous value. For example, the tab
lists 1,10,20,30 and 1,10,+10,+10 are considered to be identical.
.sp
.SH STDIN
.LP
Not used.
.SH INPUT FILES
.LP
None.
.SH ENVIRONMENT VARIABLES
.LP
The following environment variables shall affect the execution of
\fItabs\fP:
.TP 7
\fILANG\fP
Provide a default value for the internationalization variables that
are unset or null. (See the Base Definitions volume of
IEEE\ Std\ 1003.1-2001, Section 8.2, Internationalization Variables
for
the precedence of internationalization variables used to determine
the values of locale categories.)
.TP 7
\fILC_ALL\fP
If set to a non-empty string value, override the values of all the
other internationalization variables.
.TP 7
\fILC_CTYPE\fP
Determine the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as
opposed to multi-byte characters in arguments).
.TP 7
\fILC_MESSAGES\fP
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard
error.
.TP 7
\fINLSPATH\fP
Determine the location of message catalogs for the processing of \fILC_MESSAGES
\&.\fP
.TP 7
\fITERM\fP
Determine the terminal type. If this variable is unset or null, and
if the \fB-T\fP option is not specified, an unspecified
default terminal type shall be used.
.sp
.SH ASYNCHRONOUS EVENTS
.LP
Default.
.SH STDOUT
.LP
If standard output is a terminal, the appropriate sequence to clear
and set the tab stops may be written to standard output in
an unspecified format. If standard output is not a terminal, undefined
results occur.
.SH STDERR
.LP
The standard error shall be used only for diagnostic messages.
.SH OUTPUT FILES
.LP
None.
.SH EXTENDED DESCRIPTION
.LP
None.
.SH EXIT STATUS
.LP
The following exit values shall be returned:
.TP 7
\ 0
Successful completion.
.TP 7
>0
An error occurred.
.sp
.SH CONSEQUENCES OF ERRORS
.LP
Default.
.LP
\fIThe following sections are informative.\fP
.SH APPLICATION USAGE
.LP
This utility makes use of the terminal's hardware tabs and the \fIstty\fP
\fItabs\fP
option.
.LP
This utility is not recommended for application use.
.LP
Some integrated display units might not have escape sequences to set
tab stops, but may be set by internal system calls. On
these terminals, \fItabs\fP works if standard output is directed to
the terminal; if output is directed to another file, however,
\fItabs\fP fails.
.SH EXAMPLES
.LP
None.
.SH RATIONALE
.LP
Consideration was given to having the \fItput\fP utility handle all
of the functions
described in \fItabs\fP. However, the separate \fItabs\fP utility
was retained because it seems more intuitive to use a command
named \fItabs\fP than \fItput\fP with a new option. The \fItput\fP
utility does not support setting or clearing tabs, and no known historical
version of
\fItabs\fP supports the capability of setting arbitrary tab stops.
.LP
The System V \fItabs\fP interface is very complex; the version in
this volume of IEEE\ Std\ 1003.1-2001 has a reduced
feature list, but many of the features omitted were restored as XSI
extensions even though the supported languages and coding
styles are primarily historical.
.LP
There was considerable sentiment for specifying only a means of resetting
the tabs back to a known state-presumably the
"standard" of tabs every eight positions. The following features were
omitted:
.IP " *" 3
Setting tab stops via the first line in a file, using -- \fIfile\fP.
Since even the SVID has no complete explanation of this
feature, it is doubtful that it is in widespread use.
.LP
.LP
In an early proposal, a \fB-t\fP \fItablist\fP option was added for
consistency with \fIexpand\fP; this was later removed when inconsistencies
with the historical list of tabs were
identified.
.LP
Consideration was given to adding a \fB-p\fP option that would output
the current tab settings so that they could be saved and
then later restored. This was not accepted because querying the tab
stops of the terminal is not a capability in historical
\fIterminfo\fP or \fItermcap\fP facilities and might not be supported
on a wide range of terminals.
.SH FUTURE DIRECTIONS
.LP
None.
.SH SEE ALSO
.LP
\fIexpand\fP , \fIstty\fP , \fItput\fP , \fIunexpand\fP
.SH COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. In the
event of any discrepancy between this version 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 .
|