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 .

Option

-t tab1 , tab2 ,..., tabn

Set tab stops at tab1, tab2, etc. If only tab1 is specified, sets tab stops every tab1 spaces.

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 Tiger in a Nutshell 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.