Within same workdir I have several 2 column tables (with | separators between the columns) containing the same number of lines and share the order within the first column . Here is an example for two tables containing 8 lines:
table 1.csv
lig10| -5.4600
lig13| -5.9900
lig14| -4.2200
lig15| -4.9200
lig3| -6.9700
lig4| -7.4000
lig5| -6.0000
lig9| -6.5700
table 2.csv
lig10| -5.2400
lig13| -6.6900
lig14| -4.4600
lig15| -4.9600
lig3| -6.9000
lig4| -6.3100
lig5| -3.7900
lig9| -6.5800
I would like to merge all tables in that (quite similar) format together side-by-side into big table, taking all data, so that the resulting table should contain the same number of lines with the number of columns proportional to number of fused filles. E.g. for 10 separate tables it would be 20 column table (note: I always take the column number one, even it is the same for all tables!),etc In the resulting table I would like to add header for each 2nd column (of initial table), according to the name of the initial file. Here is expected output for the 2 tables.
Is it possible to use some linux utility to fuse the tables in terminal in one line command like
prog -i /workdir/*.csv -o resulting_table.csv
paste file1 file2
? – DopeGhoti Oct 09 '20 at 15:25