commands
unexpand — convert suitable blanks to tabs
Convert leading blanks by default; -a includes other blanks, -t N uses tab stops every N columns (also implies -a in GNU). Not a byte-exact inverse of expand. Example assumes a fresh text-streams lab fixture.
Formal Syntax & Structure
linux syntaxlinux
unexpand [OPTION]... [FILE]...Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| -a | option | Convert all suitable blanks |
| -t | option | Tab stop spacing |
| FILE | operand | Input file |
Return Value
exit status and output
GNU unexpand writes text with eligible blank sequences converted to tabs and returns nonzero on errors. A successful result is not necessarily byte-identical to the input after a round trip through expand.
Working Example
Example Snippetlinux
unexpand -a -t 4 spaces.txt