SYNOPSIS
unexpand [
DESCRIPTION
unexpand replaces blank characters in the data from each file argument with the most efficient use of tabs and spaces. If you do not specify any files, unexpand reads the standard input. The result is sent to standard output.
Backspace characters are preserved. By default, unexpand compresses only leading spaces; tab stops are set every eight spaces.
Options
-a -
compresses spaces into tabs wherever the resulting output is shorter, regardless of where the spaces occur in the line.
-t tablist-
specifies tab stops. The numbers in tablist are delimited by blanks or commas. If tablist is a single number, unexpand places tab stops every tablist positions. If tablist contains multiple numbers, unexpand places tab stops at those specific positions. Multiple numbers in tablist must be in ascending order. This option, like the
-a option, compresses spaces to tabs at any appropriate point in the line. If you specify-t , unexpand ignores the presence or absence of-a .
DIAGNOSTICS
Possible exit status values are:
- 0
-
Successful completion.
- 1
-
Failure due to an invalid command line argument, or an inability to open the input file(s).
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. 4.2 BSD UNIX. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AVAILABILITY
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.