Convert tabs to spaces.

Synopsis

expand [OPTION]... [FILE]...

Description

Convert TABs in each FILE to spaces, writing to standard output. If no FILE is specified, standard input is read.

Options

-t N Use N spaces per tab (default: 8).

-t LIST Use comma-separated list of tab stops.

-i Only convert leading tabs on each line.

Examples

$ expand file.txt

Convert all tabs to 8 spaces.

$ expand -t 4 file.txt

Use 4-space tabs.

$ expand -t 4,8,12 file.txt

Custom tab stops.

See Also

unexpand, fold, column