Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

unexpand(1) OSS Shell and Utilities Reference Manual
NAME
unexpand - Replace tab or space characters
SYNOPSIS
unexpand [-a][-t tablist][le ...]
The unexpand command puts tab characters back into the data from the standard input le,
or the named les and writes the result to the standard output le.
FLAGS
-a Replaces spaces at the beginning of each line with a tab, and inserts tab characters
wherever their presence compresses the resultant le, by replacing two or more charac-
ters. When the -t ag is specied with the unexpand command, the -a ag has no
effect.
-t tablist Species the tab stops. The tablist argument consists of a single positive decimal
integer or multiple positive decimal integers, separated by spaces or commas, in
ascending order. If a single number is specied, tabs are set tablist column positions
apart instead of the default width (8). If multiple numbers are specied, tabs are set at
those specic column positions. Tabbing to tab stop position n thus causes the next
character output to be in the (n+1)th column position on that line.
DESCRIPTION
Backspace characters are preserved in the output and decrement the column count for tab calcu-
lations. The column position count cannot be decremented below zero.
By default, the unexpand command converts only spaces within sequences of spaces and tab
characters at the beginnings of lines. Use the -a ag to convert other sequences of spaces.
EXAMPLES
1. To replace the spaces in le with tab characters, enter:
unexpand -a le
RELATED INFORMATION
Commands: expand(1).
932 Hewlett-Packard Company 527188-003