EXPAND(1) — USER COMMANDS
NAME
expand, unexpand − expand tabs to spaces, and vice versa
SYNOPSIS
expand [ −tabstop ] [ −tab1,tab2,...,tabn ] [ filename ... ]
unexpand [ −a ] [ filename ... ]
DESCRIPTION
expand copies the named files (or the standard input) to the standard output, with tabs changed into spaces (blanks). 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 tabs.
Unexpand copies the named files (or the standard input) to the standard output, putting tabs back into the data. By default, only leading spaces (blanks) and tabs are converted to strings of tabs, but this can be overridden by the −a option (see the options section below).
EXPAND OPTIONS
−tabstop
Specified as a single argument sets tabs tabstop spaces apart instead of the default 8.
−tab1,tab2,...,tabn
Set tabs at the columns specified by tab1...
UNEXPAND OPTIONS
−a Insert tabs when replacing a run of two or more spaces would produce a smaller output file.
Sun Release 3.2 — Last change: 17 July 1986