svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
expand(1)
expand(1) User Commands expand(1)
NAME
expand, unexpand - expand TAB characters to SPACE characters, and vice
versa
SYNOPSIS
expand [-i | --initial] [--help] [-t | --tabs tablist] [file]...
expand [-i | --initial] [--help] [-tabstop]
[-tab1, tab2, . . . , tabn] [file]...
unexpand [-a | --all] [--first-only] [--help]
[-t | --tabs tab1, tab2, . . . , tabn] [file]...
DESCRIPTION
The expand utility copies files (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 files (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
The following option is supported for both expand and unexpand:
--help Print command usage and exit.
The following options are supported for expand:
-t, --tabs tablist
Specifies the tab stops. The argument tablist must consist of a
single positive decimal integer or multiple positive decimal inte‐
gers, separated by blank characters or commas, in ascending order.
If a single number is given, tabs will be set tablist column posi‐
tions apart instead of the default 8. If multiple numbers are
given, the tabs will be set at those specific column positions.
Each tab-stop position N must be an integer value greater than
zero, and the list must be in strictly ascending order. This is
taken to mean that, from the start of a line of output, tabbing to
position N causes the next character output to be in the (N+1)th
column position on that line.
In the event of expand having to process a tab character at a posi‐
tion beyond the last of those specified in a multiple tab-stop
list, the tab character is replaced by a single space character in
the output.
-i, --initial
Do not convert any TABs after non-SPACE characters are encountered.
-tabstop
Specified as a single argument, sets TAB characters tabstop SPACE
characters apart instead of the default 8.
-tab1,tab2,...,tabn
Sets TAB characters at the columns specified by -tab1,tab2,...,tabn
The following options are supported for unexpand:
-a, --all
Inserts TAB characters when replacing a run of two or more SPACE
characters would produce a smaller output file.
--first-only
Converts only leading sequences of SPACEs. This option overrides
-a.
-t, --tabs tablist
Specifies the tab stops. The option-argument tablist must be a sin‐
gle argument consisting of a single positive decimal integer or
multiple positive decimal integers, separated by blank characters
or commas, in ascending order. If a single number is given, tabs
will be set tablist column positions apart instead of the default
8. If multiple numbers are given, the tabs will be set at those
specific column positions. Each tab-stop position N must be an in‐
teger value greater than zero, and the list must be in strictly as‐
cending order. This is taken to mean that, from the start of a line
of output, tabbing to position N will cause the next character out‐
put to be in the (N+1)th column position on that line. When the -t
option is not specified, the default is the equivalent of specify‐
ing -t 8 (except for the interaction with -a, described below).
No space-to-tab character conversions occur for characters at posi‐
tions beyond the last of those specified in a multiple tab-stop
list.
When -t is specified, the presence or absence of the -a option is
ignored; conversion will not be limited to the processing of lead‐
ing blank characters.
OPERANDS
The following operand is supported for expand and unexpand:
file The path name of a text file to be used as input. If file is -,
the command reads from the standard input at that point in the
sequence.
If no file operands are specified, the standard input is used.
ENVIRONMENT VARIABLES
See environ(7) for descriptions of the following environment variables
that affect the execution of expand and unexpand: LANG, LC_ALL,
LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion
>0 An error occurred.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Availabilitysystem/core-os _ CSIenabled _ Interface
StabilityCommitted _ StandardSee standards(7).
SEE ALSO
tabs(1), attributes(7), environ(7), standards(7)
HISTORY
The -i, --initial, --help and --tabs options to expand; the --all,
--first-only, --help, and --tabs options to unexpand; and support for
the - operand to operate on standard input were added in the Oracle So‐
laris 11.4.0 release.
The -t option to expand and unexpand was added in the Solaris 2.5 re‐
lease.
The -tabstop and -tab1,[...] options to expand and the -a option to un‐
expand have been present since the initial release of Solaris.
The expand and unexpand commands have been present since the initial
release of Solaris.
Oracle Solaris 11.4 29 Nov 2022 expand(1)