UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: exChapter 2
Unix Commands
Next: Reference: expr
 

expand

expand [options] [files]

Expand tab characters into appropriate number of spaces. expand reads the named files or standard input if no files are provided. See also unexpand.

Options

-t tablist

Interpret tabs according to tablist, a space- or comma-separated list of numbers in ascending order, that describe the "tabstops" for the input data.

-n

Set the tabstops every n characters. The default is 8.

-tablist

Interpret tabs according to tablist, a space- or comma-separated list of numbers in ascending order, that describe the "tabstops" for the input data.

Example

Cut columns 10-12 of the input data, even when tabs are used:

expand data | cut -c 10-12 > data.col2


Previous: Reference: exUNIX in a Nutshell: System V EditionNext: Reference: expr
Reference: exBook IndexReference: expr

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System