I start with a file containing two very long csv lines of data. The first contains header column names, the second contain the corresponding values:
header1,header2,header3,header4.........,header20
data1,data2,data3,data4............,data20
I can display these in a tabular format by using:
cat inputFile | column -t -s ','
Result:
header1 header2 header3 header4 .................... header20
data1 data2 data3 data4 .................... data20
This works fine, except that there are so many columns that I have to widen my terminal window beyond the width of 2 monitors to overcome the wrap and see them all lined up nicely.
Is there a way to break this into multiple rows of N columns? Something like:
header1 header2 header3 ........................ header10
data1 data2 data3 ........................ data10
header11 header12 header13 ...................... header20
data11 data12 data13 ...................... data20