EXPAND(1) General Commands Manual EXPAND(1)
expand, unexpand - expand TAB characters to SPACE characters, and vice
expand [ -tabstop ] [ -tab1,tab2,...,tabn ] [ filename ... ]
unexpand [ -a ] [ filename ... ]
expand copies filenames (or the standard input) to the standard output,
with TAB characters expanded to SPACE characters. BACKSPACE characters
are preserved into 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 TAB
unexpand copies filenames (or the standard input) to the standard out-
put, putting TAB characters back into the data. By default, only lead-
ing SPACE and TAB characters are converted to strings of tabs, but this
can be overridden by the -a option (see the OPTIONS section below).
Specify as a single argument, sets TAB characters tabstop SPACE
characters apart instead of the default 8.
Set TAB characters at the columns specified by tab1...
-a Insert TAB characters when replacing a run of two or more SPACE
characters would produce a smaller output file.
9 September 1987 EXPAND(1)