tldr/pages/common/unexpand.md

25 lines
564 B
Markdown
Raw Normal View History

2016-06-21 18:38:08 +01:00
# unexpand
> Convert spaces to tabs.
> More information: <https://www.gnu.org/software/coreutils/unexpand>.
2016-06-21 18:38:08 +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
- 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}}`