unexpand - convert spaces to tabs
unexpand [ options ] [file ...]
writes the contents of each given file to standard output with strings of two or more space and tab characters at
the beginning of each line converted to as many tabs as possible followed by as many spaces needed to fill the same number of
column positions. By default, tabs are set at every 8th column. Each backspace character copied to standard output causes the
column position to be decremented by 1 unless already in the first column.
If no file is given, or if the file is -, unexpand copies from standard input. The start of the file is
defined as the current offset.
- -a, --all
Convert all strings of two or more spaces or tabs, not just initial ones.
- -t, --tabs=tablist
tablist is a comma or space separated list of positive integers that
specifies the tab stops. If only one tab stop is specified, then tabs will be set at that many column positions apart. Otherwise,
the value in tablist must be in ascending order and the tab stops will be set to these positions. This option implies the -a
option. The default value is 8.
- All files unexpanded successfully.
One or more files failed to open or could not be read.