snippetbashTip
expand — Convert tabs to spaces. More information: <https://www.gnu.org/software/coreutils/manual/html_node/e
Viewed 0 times
tabscommandspacesconvertcliinformationexpandmore
Problem
How to use the
expand command: Convert tabs to spaces. More information: <https://www.gnu.org/software/coreutils/manual/html_node/expand-invocation.html>.Solution
expand — Convert tabs to spaces. More information: <https://www.gnu.org/software/coreutils/manual/html_node/expand-invocation.html>.Convert tabs in each file to spaces, writing to
stdout:expand {{path/to/file}}Convert tabs to spaces, reading from
stdin:expandDo not convert tabs after non blanks:
expand {{[-i|--initial]}} {{path/to/file}}Have tabs a certain number of characters apart, not 8:
expand {{[-t|--tabs]}} {{number}} {{path/to/file}}Use a comma separated list of explicit tab positions:
expand {{[-t|--tabs]}} {{1,4,6}}Code Snippets
Convert tabs in each file to spaces, writing to `stdout`
expand {{path/to/file}}Convert tabs to spaces, reading from `stdin`
expandDo not convert tabs after non blanks
expand {{[-i|--initial]}} {{path/to/file}}Have tabs a certain number of characters apart, not 8
expand {{[-t|--tabs]}} {{number}} {{path/to/file}}Use a comma separated list of explicit tab positions
expand {{[-t|--tabs]}} {{1,4,6}}Context
tldr-pages: common/expand
Revisions (0)
No revisions yet.