GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Expand Tabs to Spaces |
20200423 The expand command is used to expands tabs into spaces retaining the alignment.
$ cat mytabs.txt A simple file with tabs to align columns across multiple rows $ cat -T mytabs.txt A simple^Ifile^Iwith tabs to align^Icolumns^Iacross multiple^Irows^I $ expand mytabs.txt A simple file with tabs to align columns across multiple rows $ expand mytabs.txt > myspaces.txt $ cat -T myspaces.txt A simple file with tabs to align columns across multiple rows |
See https://www.putorius.net/expand-convert-tabs-to-spaces.htmlfor more examples.