MPE/iX Shell and Utilities Reference Manual, Vol 1

expand(1) MPE/iX Shell and Utilities expand(1)
NAME
expand — expand tabs to spaces
SYNOPSIS
expand [–t tablist][file ...]
expand [–number][number,number...] [file ...]
DESCRIPTION
expand reads text input from the files specified on the command line, converts tabs into
spaces, and writes the result to the standard output. If you do not specify any files on the com-
mand line, expand reads from the standard input.
expand preserves backspace characters. By default, tab stops are set every eight columns. A
tab after the last tabstop is replaced by a space.
Options
The first syntax of expand accepts the following option:
–t tablist
sets tab stops at positions indicated by tablist. Numbers in tablist must be in
ascending order (origin 0) and separated by commas or blanks; however the list
must be one argument so you need shell quoting if you are using blanks. The list
may consist of a single number, in which case tabs are set every tablist positions
apart.
The second syntax of expand (which the
POSIX standard considers obsolete) accepts the fol-
lowing options:
number
sets tab stops every number columns.
number,number...
sets tab stops at each column number (origin 0).
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
1 An error occurred.
Commands and Utilities 1-215