tabs Command Purpose Sets tab stops on terminals. Syntax tabs [ TabSpec ... ] [ +m [ Number ] ] [ -T Terminal ... ] Description The tabs command clears up to 20 previous tabs and sets up to 40 tabs on the workstation according to the supplied TabSpec. TabSpec can be either a flag indicating an available code or column numbers. The available codes cover formats required by most structured programming languages. When you use the tabs command, always see the leftmost column number as 1, even if your work station refers to it as 0. If you do not specify a TabSpec, the default value is -8. The following are the preset formats that can be used to set TabSpec: -a Sets the tabs to 1, 10, 16, 36, and 72 (IBM S/370 Assembler first format). -a2 Sets the tabs to 1, 10, 16, 40, and 72 (IBM S/370 Assembler second format). -c Sets the tabs to 1, 8, 12, 16, 20, and 55 (COBOL normal for- mat). -c2 Sets the tabs to 1, 6, 10, 14, and 49 (COBOL compact format, columns 1-6 omitted). With this code, the first column position corresponds to card column 7. One space gets you to column 8, and a tab reaches column 12. Files using this code should include a format specification of: <:t-c2 m6 s66 d:> The fspec file explains format specifications. -c3 Sets the tabs to 1, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, and 67 (COBOL compact format with more tabs than -c2. This is the recommended format for COBOL. Files us- ing this code should include a format specification of: <:t-c3 m6 s66 d:> -f Sets the tabs to 1, 7, 11, 15, 19, and 23 (FORTRAN). -p Sets the tabs to 1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, and 61 (PL/I). -s Sets the tabs to 1, 10, and 55 (SNOBOL). -u Sets the tabs to 1, 12, 20, and 44. In addition to the preset formats, three other types of TabSpecs are available: -Number Sets regularly repeating tabs at every Number column. (-8 is the standard operating system tab setting and the one re- quired for when using the nroff command and specifying the -h flag.) Another special case is -0, which implies no tabs at all. Number [ ,Number ] ... Sets tabs at the named column numbers (a comma-separated list in ascending order). You may specify up to 40 numbers. If any number except the first has a plus sign pre- fix, the prefixed number is added to the previous number for the next setting. Thus, the tab lists 1,10,20,30 and 1,10,+10,+10 provide the same tab settings. -Filep Reads the first line of the named Filep for a format specification. If it finds one, it sets tabs the same way. If it does not find a format specification, it sets tabs to the sys- tem default (-8). Use this TabSpec to make sure that a file has the same tab settings as those in a file already correctly for- matted. Flags -T Terminal Identifies the terminal so that the tabs command can set tabs and margins correctly. Terminal is one of the terminals specified in the greek command. If you do not provide a -T flag, the tabs command uses the shell variable $TERM. If no Terminal can be found, the tabs command tries a general value that works for most terminals. +m Number Moves all tabs to the right Number columns, and makes column Number1 the left margin. If m is given without a value, 10 is assumed. The leftmost margin on most work stations is de- fined by m0. Note: If the same flag occurs more than once, only the last flag takes effect. Exit Status This command returns the following exit values: 0 Successful completion. >0 An error occurred. Examples To set tabs every four spaces, enter: tabs -4 Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files /usr/bin/tabs Contains the tabs command. Related Information The greek command, nroff command, troff command.