353 lines
14 KiB
HTML
353 lines
14 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>tabs</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="tabs"></a> <a name="tag_04_136"></a><!-- tabs -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_136_01"></a>NAME</h4>
|
|
|
|
<blockquote>tabs - set terminal tabs</blockquote>
|
|
|
|
<h4><a name="tag_04_136_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('UP XSI')">UP XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> tabs</tt> <b>[</b> <tt>-</tt><i>n</i><tt>| -a| -a2| -c| -c2| -c3| -f| -p| -s|
|
|
-u</tt><b>][</b><tt>+m</tt><b>[</b><i>n</i><b>]]</b> <tt></tt><b>[</b><tt>-T</tt> <i>type</i><b>]</b><tt><br>
|
|
<br>
|
|
tabs</tt> <b>[</b><tt>-T</tt> <i>type</i><b>][</b> <tt>+</tt><b>[</b><i>n</i><b>]]</b>
|
|
<i>n1</i><b>[</b><tt>,</tt><i>n2</i><tt>,...</tt><b>]</b><tt><img src="../images/opt-end.gif" alt="[Option End]" border=
|
|
"0"></tt></code></div>
|
|
|
|
<tt><br>
|
|
</tt></blockquote>
|
|
|
|
<h4><a name="tag_04_136_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>tabs</i> 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 <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src=
|
|
"../images/opt-start.gif" alt="[Option Start]" border="0"> and optionally adjusts the margin. <img src=
|
|
"../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
|
|
|
<p>The phrase "tab-stop position <i>N</i>" shall be taken to mean that, from the start of a line of output, tabbing to position
|
|
<i>N</i> shall cause the next character output to be in the ( <i>N</i>+1)th column position on that line. The maximum number of tab
|
|
stops allowed is terminal-dependent.</p>
|
|
|
|
<p>It need not be possible to implement <i>tabs</i> on certain terminals. If the terminal type obtained from the <i>TERM</i>
|
|
environment variable or <b>-T</b> option represents such a terminal, an appropriate diagnostic message shall be written to standard
|
|
error and <i>tabs</i> shall exit with a status greater than zero.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>tabs</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>, <sup>[<a href=
|
|
"javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> except for
|
|
various extensions: the options <b>-a2</b>, <b>-c2</b>, and <b>-c3</b> are multi-character. <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></p>
|
|
|
|
<p>The following options shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-</b><i>n</i></dt>
|
|
|
|
<dd>Specify repetitive tab stops separated by a uniform number of column positions, <i>n</i>, where <i>n</i> is a single-digit
|
|
decimal number. The default usage of <i>tabs</i> with no arguments shall be equivalent to <b>tabs</b>-8. When <b>-0</b> is used,
|
|
the tab stops shall be cleared and no new ones set.</dd>
|
|
|
|
<dt><b>-a</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,10,16,36,72<br>
|
|
Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-a2</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,10,16,40,72<br>
|
|
Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-c</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,8,12,16,20,55<br>
|
|
COBOL, normal format. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-c2</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,6,10,14,49<br>
|
|
COBOL, compact format (columns 1 to 6 omitted). <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-c3</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
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 <b>-c2</b>. <img src="../images/opt-end.gif" alt="[Option End]"
|
|
border="0"></dd>
|
|
|
|
<dt><b>-f</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,7,11,15,19,23<br>
|
|
FORTRAN <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-p</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61<br>
|
|
PL/1 <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-s</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,10,55<br>
|
|
SNOBOL <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-u</b></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
1,12,20,44<br>
|
|
Assembler, applicable to some mainframes. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
|
|
|
|
<dt><b>-T </b> <i>type</i></dt>
|
|
|
|
<dd>Indicate the type of terminal. If this option is not supplied and the <i>TERM</i> variable is unset or null, an unspecified
|
|
default terminal type shall be used. The setting of <i>type</i> shall take precedence over the value in <i>TERM .</i></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operand shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>n1</i><b>[</b>,<i>n2</i>,...<b>]</b></dt>
|
|
|
|
<dd>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.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>Not used.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>tabs</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>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).</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
|
error.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
|
|
Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt=
|
|
"[Option End]" border="0"></dd>
|
|
|
|
<dt><i>TERM</i></dt>
|
|
|
|
<dd>Determine the terminal type. If this variable is unset or null, and if the <b>-T</b> option is not specified, an unspecified
|
|
default terminal type shall be used.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>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.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used only for diagnostic messages.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following exit values shall be returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>Successful completion.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_136_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>This utility makes use of the terminal's hardware tabs and the <a href="../utilities/stty.html"><i>stty</i></a> <i>tabs</i>
|
|
option.</p>
|
|
|
|
<p>This utility is not recommended for application use.</p>
|
|
|
|
<p>Some integrated display units might not have escape sequences to set tab stops, but may be set by internal system calls. On
|
|
these terminals, <i>tabs</i> works if standard output is directed to the terminal; if output is directed to another file, however,
|
|
<i>tabs</i> fails.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>Consideration was given to having the <a href="../utilities/tput.html"><i>tput</i></a> utility handle all of the functions
|
|
described in <i>tabs</i>. However, the separate <i>tabs</i> utility was retained because it seems more intuitive to use a command
|
|
named <i>tabs</i> than <a href="../utilities/tput.html"><i>tput</i></a> with a new option. The <a href=
|
|
"../utilities/tput.html"><i>tput</i></a> utility does not support setting or clearing tabs, and no known historical version of
|
|
<i>tabs</i> supports the capability of setting arbitrary tab stops.</p>
|
|
|
|
<p>The System V <i>tabs</i> 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.</p>
|
|
|
|
<p>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:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>Setting tab stops via the first line in a file, using -- <i>file</i>. Since even the SVID has no complete explanation of this
|
|
feature, it is doubtful that it is in widespread use.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>In an early proposal, a <b>-t</b> <i>tablist</i> option was added for consistency with <a href=
|
|
"../utilities/expand.html"><i>expand</i></a>; this was later removed when inconsistencies with the historical list of tabs were
|
|
identified.</p>
|
|
|
|
<p>Consideration was given to adding a <b>-p</b> 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
|
|
<i>terminfo</i> or <i>termcap</i> facilities and might not be supported on a wide range of terminals.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="expand.html"><i>expand</i></a> , <a href="stty.html"><i>stty</i></a> , <a href="tput.html"><i>tput</i></a> , <a href=
|
|
"unexpand.html"><i>unexpand</i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_136_22"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>This utility is marked as part of the User Portability Utilities option.</p>
|
|
|
|
<p>The normative text is reworded to avoid use of the term "must" for application requirements.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|