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 command
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 following 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.
1
expand(1) MPE/iX Shell and Utilities expand(1)
______________________________________________________________________
Messages
Message: Bad tab stop specification
Cause: You specified an illegal character in a tab stop speci-
fication, or you did not specify tab stops in ascending
order.
Action: Re-enter the command with a valid tab specification.
Message: file "filename": system error
Cause: See syserror(3).
Action: See syserror(3).
Message: insufficient memory
Cause: There were not enough free system resources for expand
to expand all tabs to spaces.
Action: Free up more system resources.
Message: Unknown option "-option"
Cause: You specified an option that is not valid for expand.
Action: Check the DESCRIPTION section of this man page for a
list of valid expand options.
Message: write error on standard output
Cause: See syserror(3).
Action: See syserror(3).
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. 4.2 BSD UNIX and up.
MPE/iX NOTES
For information on how the current MPE/iX implementation may
affect the operation of this utility, see Appendix A, MPE/iX
Implementation Considerations.
SEE ALSO
pr(1), unexpand(1)
2