This command is only available to users accessing the POSIX shell via rlogin.
tabs sets the tab stops on the user’s terminal, clearing any previous settings. For tabs to be effective, the terminal must have hardware tabs that can be set remotely using escape sequences.
The lowest column number is 1. For tabs, column 1 refers to the leftmost column on the screen, even on terminals whose column markers begin at 0.
Syntax
tabs[ -T type][ +mn][ tabspec] |
Terminal type, which needs to be known for margin setting. type is a name listed in /usr/share/lib/terminfo. -T
All tabs are moved n columns to the right, with n+1 becoming the left margin. If n is omitted, a value of 10 is assumed. For a TermiNet, the first value in the tab list should be 1, or the margin will move even further to the right. Normally, the leftmost margin is set with +m0. On most terminals, the margin is reset further to the right only when +m is specified explicitly.
Four different types of tab specification are permitted:
tabs in a predefined pattern (canned)
tabs at regular intervals (repetitive)
tabs in a pattern defined in file (file)
tabs at freely selectable positions (arbitrary)
You determine the pattern of tabs on a line by specifying one of the following:
Tab stops in columns 1,10,16,36,72.
Tab stops in columns 1,10,16,40,72.
Tab stops in columns 1,8,12,16,20,55.
Tab stops in columns 1,6,10,14,49.
Tab stops in columns 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67.
Tab stops in columns 1,7,11,15,19,23.
Tab stops in columns 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61.
Tab stops in columns 1,10,55.
Tab stops in columns 1,12,20,44. -n The number specified causes tab stops to be set in columns 1+n,1+2n,1+3n. Specifying 8 eight gives you the Unix system standard tab setting. Specifying 0 clears all tab stops. --file tabs reads the first line of the file, searching for a format specification. If it finds one, it sets the tab stops accordingly. Otherwise, the default value 8 is assumed. This type of format may be used to ensure that a tabbed file is printed with the correct tab settings, with tabs being used in conjunction with pr (see pr). n1[,n2,...] You can freely select the columns for the tab stops by means of a list containing up to 64 numbers in ascending order. A number preceded by a plus sign is added to the value of the previous number. This does not apply to the first number. The format 1,10,20,30, for example, can be specified as 1,10,+10,+10. The numbers are separated by a comma, or the list is enclosed in quotes, whereby the numbers are separated by a comma and/or a blank. n1[,n2,...] must be specified as the last argument in the command line. tabspec not specified: |
Hint
The mechanisms for clearing tab stops and setting the left margin are not the same on every terminal. tabs can set a maximum of 64 tab stops, but will only clear 20. |
Error
When setting arbitrary tab stops you failed to maintain ascending order or you specified a zero.
When setting arbitrary tab stops you specified a zero or omitted an increment.
The code you specified as tabspec cannot be found.
The file you specified as tabspec cannot be opened.
The format specification in the file specified as tabspec points to another file. Indirect references of this sort are not permitted.
You are running the command on an unknown terminal type, e.g. on a block-mode terminal. |
File
/usr/share/lib/terminfo/?/* Files used to name and define terminals |
Variable
TERM Terminal type |
Locale
The following environment variables affect the execution of tabs: LANG Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined. LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables. LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files), the classification of characters as upper- to lower-case, and the mapping of characters from one case to the other. LC_MESSAGES Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. NLSPATH Determine the location of message catalogs for the processing of LC_MESSAGES. |
Example 1
Setting tab stops in COBOL normal format.
|
Example 2
Set a tab in every sixth column, i.e. in columns 1,7,13,19,...
|
Example 3
Set tabs in columns 1, 8 and 36.
This has the same effect as
|
Example 4
Setting tab stops in accordance with the first line (format specification) of your file $HOME/tabspec.list/file1.
|
See also
pr, tput |