¿Cómo alinear las columnas de tablas en Bash?
Me gustaría dar salida a un texto de formato de tabla. Lo que intenté hacer fue repetir los elementos de una matriz con '\ t', pero estaba desalineado. mi código
for((i=0;i<array_size;i++));
do
echo stringarray[$i] Mi salida
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Salida deseada
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
\t' numberarray[$i] Mi salida
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Salida deseada
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
\t' anotherfieldarray[$i]
done;
Mi salida
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield
Salida deseada
a very long string.......... 112232432 anotherfield
a smaller string 123124343 anotherfield