unexpand - compress spaces into tabs
unexpand [-a|-t tablist] [file ...]
The unexpand(1) utility converts spaces into tabs in the data from the standard input or the named files, and then writes the result on the standard output. Backspace characters are preserved into the output and decrement the column count for tab calculations. Without options, unexpand(1) only converts leading blank characters, those at the beginnings of lines.
The unexpand(1) utility takes these options:
If more than one number is specified, they are taken as the positions of the tabstops. The numbers must be in ascending order.
If multiple tabstops are given (separated by blank characters or commas), the tabs are set at those specific columns. Blank characters beyond the last specified tabstop are not converted.
If -t is specified, -a is ignored.
The unexpand(1) utility exits with status 0 on success and >0 if an error, such as a problem opening a file, occurred.
expand(1)