tab, untab, expand, unexpand(1,C) tab, untab, expand, unexpand(1,C)
-------------------------------------------------------------------------------
tab, untab, expand, unexpand
PURPOSE
Changes spaces into tabs or tabs into spaces.
SYNTAX
+------+ +--------+
tab ---| |---| |---|
+- -e -+ +- file -+
^ |
+------+
+--------+
untab ---| |---|
+- file -+
^ |
+------+
expand [-tabstop] [-tab1, tab2, . . ., tabn] [file . . . ]
unexpand [-a] [file . . . ]
DESCRIPTION
The tab command reads files (standard input by default), replaces spaces in the
input with tab characters wherever it can eliminate one or more spaces. It
writes the resulting file back to file or, if the input was standard input, to
standard output. tab assumes that the tab stops are set every eight columns
starting with column nine.
The untab command reads files or standard input, replaces tabs in the input
with space characters and writes back to the original file or to standard
output.
Expand processes the named files or the standard input writing the standard
output with tabs changed to blanks. Backspace characters are preserved in the
output and decrement the column count for tab calculations. Expand is useful
for pre-processing character files (before sorting, looking at specific
columns, etc.) that contain tabs.
Unexpand puts tabs back into the data from the standard input or the named
files and writes the result on the standard output. By default, only leading
blanks and tabs are reconverted to maximal strings of tabs.
FLAG
Processed Nov. 8, 1990 tab, untab, expand, unexpand(1,C) 1
tab, untab, expand, unexpand(1,C) tab, untab, expand, unexpand(1,C)
For the tab command:
-e Replaces only those spaces at the beginning of a line up to the first
non-space character.
For the expand command:
-tabstop
Sets tabs at tabstop spaces apart instead of the default (8).
-tab1, tab2, . . .,tabn
Sets tabs at specified columns.
For the unexpand command:
-a Inserts tabs wherever their presence compresses the resultant file by
replacing two or more characters.
RELATED INFORMATION
See the following command: "newform."
Processed Nov. 8, 1990 tab, untab, expand, unexpand(1,C) 2