compress spaces into tabs 



unexpand [-a] [-t tablist] [file ...]


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.



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.


Possible exit status values are:


Successful completion.


Failure due to an invalid command line argument, or an inability to open the input file(s).


POSIX.2. x/OPEN Portability Guide 4.0. 4.2 BSD UNIX. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


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


expand, pr

PTC MKS Toolkit 10.1 Documentation Build 15.