expand

v0.0.26
expand [OPTION]... [FILE]...

Convert tabs in each FILE to spaces, writing to standard output. With no FILE, or when FILE is -, read standard input.

Options

--initial, -i

do not convert tabs after non blanks

--tabs=<N, LIST>, -t <N, LIST>

have tabs N characters apart, not 8 or use comma separated list of explicit tab positions

--no-utf8, -U

interpret input file as 8-bit ASCII rather than UTF-8

Examples

Convert tabs in each file to spaces, writing to stdout:

expand {{path/to/file}}

Convert tabs to spaces, reading from stdin:

expand

Do not convert tabs after non blanks:

expand -i {{path/to/file}}

Have tabs a certain number of characters apart, not 8:

expand -t {{number}} {{path/to/file}}

Use a comma separated list of explicit tab positions:

expand -t {{1,4,6}}

The examples are provided by the tldr-pages project under the CC BY 4.0 License.

Please note that, as uutils is a work in progress, some examples might fail.