🧀 Learn Linux

Advanced·Reading and processing text

unexpand: Convert leading spaces to Tab

Put in free practice

Syntax

unexpand [-t width] [file…]

Options

-t
tab stop interval

Examples

unexpand -t 4 spaced.txt

Usage and sandbox support

The teaching subset only converts leading spaces and does not accept -a.

Hands-on exercises

Full documentation ↗

Related commands