Jak wyrównać kolumny tabel w Bash?
Chciałbym wydrukować tekst w formacie tabeli. To, co próbowałem zrobić, to echo elementów tablicy za pomocą „\ t mój kod
for((i=0;i<array_size;i++));
do
echo stringarray[$i] Moje dane wyjściowe
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Pożądane wyjście
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
\t' numberarray[$i] Moje dane wyjściowe
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Pożądane wyjście
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
\t' anotherfieldarray[$i]
done;
Moje dane wyjściowe
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Pożądane wyjście
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield