Name
expand
Synopsis
expand [options
] [files
]
Expands tab characters into appropriate number of spaces.
expand
reads the named files or standard input if
no files are provided. See also unexpand
.
Options
-
-
tabs
,-t
tabs
,--tabs
tabs
tabs
is a comma-separated list of integers that specify the placement of tab stops. If exactly one integer is provided, the tab stops are set to everyinteger
spaces. By default, tab stops are eight spaces apart. With-t
and--tabs
, the list may be separated by whitespace instead of commas.-
-i
,--initial
Convert tabs only at the beginning of lines.
-
--help
Print help message and then exit.
-
--version
Print version information and then exit.
Example
Cut columns 10 through 12 of the input data, even when tabs are used:
$ expand data | cut -c 10-12 > data.col2
Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.