Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

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.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.