TABS(1)                    POSIX Programmer's Manual                   TABS(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       tabs -- set terminal tabs

SSYYNNOOPPSSIISS
       tabs [[-_n|-a|-a2|-c|-c2|-c3|-f|-p|-s|-u]] [[-T _t_y_p_e]]

       tabs [[-T _t_y_p_e]] _n[[[[_s_e_p[[+]]_n]]...]]

DDEESSCCRRIIPPTTIIOONN
       The _t_a_b_s 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.

       The phrase ``tab-stop position _N'' shall be taken to mean that, from
       the start of a line of output, tabbing to position _N shall cause the
       next character output to be in the (_N+1)th column position on that
       line. The maximum number of tab stops allowed is terminal-dependent.

       It need not be possible to implement _t_a_b_s on certain terminals. If the
       terminal type obtained from the _T_E_R_M environment variable or --TT option
       represents such a terminal, an appropriate diagnostic message shall be
       written to standard error and _t_a_b_s shall exit with a status greater
       than zero.

OOPPTTIIOONNSS
       The _t_a_b_s utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s, except for
       various extensions: the options --aa22, --cc22, and --cc33 are multi-character.

       The following options shall be supported:

       --_n        Specify repetitive tab stops separated by a uniform number of
                 column positions, _n, where _n is a single-digit decimal
                 number. The default usage of _t_a_b_s with no arguments shall be
                 equivalent to _t_a_b_s -8. When --00 is used, the tab stops shall
                 be cleared and no new ones set.

       --aa        1,10,16,36,72
                 Assembler, applicable to some mainframes.

       --aa22       1,10,16,40,72
                 Assembler, applicable to some mainframes.

       --cc        1,8,12,16,20,55
                 COBOL, normal format.

       --cc22       1,6,10,14,49
                 COBOL, compact format (columns 1 to 6 omitted).

       --cc33       1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
                 COBOL compact format (columns 1 to 6 omitted), with more tabs
                 than --cc22.

       --ff        1,7,11,15,19,23
                 FORTRAN

       --pp        1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
                 PL/1

       --ss        1,10,55
                 SNOBOL

       --uu        1,12,20,44
                 Assembler, applicable to some mainframes.

       --TT _t_y_p_e   Indicate the type of terminal. If this option is not supplied
                 and the _T_E_R_M variable is unset or null, an unspecified
                 default terminal type shall be used. The setting of _t_y_p_e
                 shall take precedence over the value in _T_E_R_M.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _n[[[[_s_e_p[[+]]_n]]...]]
                 A single command line argument that consists of one or more
                 tab-stop values (_n) separated by a separator character (_s_e_p)
                 which is either a <comma> or a <blank> character. The
                 application shall ensure that the tab-stop values are
                 positive decimal integers in strictly ascending order. If any
                 tab-stop value (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
                 ""1110++1100+10" are considered to be identical.

SSTTDDIINN
       Not used.

IINNPPUUTT FFIILLEESS
       None.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _t_a_b_s:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  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).

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard
                 error.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

       _T_E_R_M      Determine the terminal type. If this variable is unset or
                 null, and if the --TT option is not specified, an unspecified
                 default terminal type shall be used.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       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.

SSTTDDEERRRR
       The standard error shall be used only for diagnostic messages.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       This utility makes use of the terminal's hardware tabs and the _s_t_t_y
       _t_a_b_s option.

       This utility is not recommended for application use.

       Some integrated display units might not have escape sequences to set
       tab stops, but may be set by internal system calls. On these terminals,
       _t_a_b_s works if standard output is directed to the terminal; if output is
       directed to another file, however, _t_a_b_s fails.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       Consideration was given to having the _t_p_u_t utility handle all of the
       functions described in _t_a_b_s.  However, the separate _t_a_b_s utility was
       retained because it seems more intuitive to use a command named _t_a_b_s
       than _t_p_u_t with a new option. The _t_p_u_t utility does not support setting
       or clearing tabs, and no known historical version of _t_a_b_s supports the
       capability of setting arbitrary tab stops.

       The System V _t_a_b_s interface is very complex; the version in this volume
       of POSIX.1-2017 has a reduced feature list, but many of the features
       omitted were restored as part of the XSI option even though the
       supported languages and coding styles are primarily historical.

       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:

        *  Setting tab stops via the first line in a file, using --_f_i_l_e.
           Since even the SVID has no complete explanation of this feature, it
           is doubtful that it is in widespread use.

       In an early proposal, a --tt _t_a_b_l_i_s_t option was added for consistency
       with _e_x_p_a_n_d; this was later removed when inconsistencies with the
       historical list of tabs were identified.

       Consideration was given to adding a --pp 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 _t_e_r_m_i_n_f_o or _t_e_r_m_c_a_p
       facilities and might not be supported on a wide range of terminals.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _e_x_p_a_n_d, _s_t_t_y, _t_p_u_t, _u_n_e_x_p_a_n_d

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 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 .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                              TABS(1)
