Convert spaces to tabs.
Synopsis
unexpand [OPTION]... [FILE]...
Description
Converts blanks in each FILE to TABs, writing to standard output. If no FILE is specified, standard input is read.
Options
-t N Use N spaces per tab (default: 8).
-t LIST Use comma-separated list of tab stops.
-a Convert all sequences of blanks, not just leading ones.
Examples
$ unexpand file.txt
Convert leading spaces to tabs.
$ unexpand -a file.txt
Convert all space sequences to tabs.
See Also
expand, fold