2016-06-21 18:38:08 +01:00
|
|
|
# unexpand
|
|
|
|
|
|
|
|
> Convert spaces to tabs.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/unexpand>.
|
2016-06-21 18:38:08 +01:00
|
|
|
|
2023-08-09 06:29:02 +01:00
|
|
|
- Convert blanks in each file to tabs, writing to `stdout`:
|
2016-06-21 18:38:08 +01:00
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`unexpand {{path/to/file}}`
|
2016-06-21 18:38:08 +01:00
|
|
|
|
2023-08-09 06:29:02 +01:00
|
|
|
- Convert blanks to tabs, reading from `stdout`:
|
2016-06-21 18:38:08 +01:00
|
|
|
|
|
|
|
`unexpand`
|
|
|
|
|
|
|
|
- Convert all blanks, instead of just initial blanks:
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`unexpand -a {{path/to/file}}`
|
2016-06-21 18:38:08 +01:00
|
|
|
|
|
|
|
- Convert only leading sequences of blanks (overrides -a):
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`unexpand --first-only {{path/to/file}}`
|
2016-06-21 18:38:08 +01:00
|
|
|
|
|
|
|
- Have tabs a certain number of characters apart, not 8 (enables -a):
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`unexpand -t {{number}} {{path/to/file}}`
|