I\'d like to output a table format text. What I tried to do was echo the elements of an array with \'\\t\', but it was misaligned.
My code
for((i=0;i
To have the exact same output as you need, you need to format the file like that :
a very long string..........\t 112232432\t anotherfield\n
a smaller string\t 123124343\t anotherfield\n
And then using :
$ column -t -s $'\t' FILE
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield