expand(1)
NAME
expand, unexpand − expand TAB characters to SPACE characters, and vice versa
SYNOPSIS
expand [ −tabstop ] [ −tab1,tab2,...,tabn ] [ filename... ]
unexpand [ −a ] [ filename... ]
AVAILABILITY
SUNWesu
DESCRIPTION
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, and so forth) that contain TAB characters.
unexpand copies filenames (or the standard input) to the standard output, putting TAB characters back into the data. By default, only leading SPACE and TAB characters are converted to strings of tabs, but this can be overridden by the −a option (see the OPTIONS section below).
OPTIONS
expand options are:
−tabstop Specify as a single argument, sets TAB characters tabstop SPACE characters apart instead of the default 8.
−tab1,tab2,...,tabn
Set TAB characters at the columns specified by tab1...
unexpand options are:
−a Insert TAB characters when replacing a run of two or more SPACE characters would produce a smaller output file.
ENVIRONMENT
LC_CTYPE determines how expand handles characters. When LC_CTYPE is set to a valid value, expand can display and handle text and filenames containing valid characters for that locale. expand can display and handle Extended Unix Code (EUC) characters where any character can be 1, 2, or 3 bytes wide. expand can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
SunOS 5.2 — Last change: 14 Sep 1992