Name

unexpand

Synopsis

    unexpand [options] [files]

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

Common Options

-a, --all

Replace spaces with tabs everywhere possible, not just leading spaces and tabs.

-ttablist, --tabs=tablist

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

GNU/Linux Option

--first-only

Convert only leading whitespace into tabs. Overrides -a.

Get Unix in a Nutshell, 4th 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.