hHi,
I have two pipe-seperated files and need to merge them as follows -
File1 -->
col_11 | col_11
col_12 | col_12
col_13 | col_13
File2 -->
col_AA | col_BA
col_AB | col_BB
col_AC | col_BC
Merged file should as follows ->
col_11 | col_AA | col_BA
col_11 | col_AB | col_BB
col_11 | col_AC | col_BC
col_12 | col_AA | col_BA
col_12 | col_AB | col_BB
col_12 | col_AC | col_BC
col_13 | col_AA | col_BA
col_13 | col_AB | col_BB
col_13 | col_AC | col_BC
Basically, add first column in line 1 from file 1 to all lines of file 2, repeate it for each line in file1.
Appreciate the help.
Thanks !
I have two pipe-seperated files and need to merge them as follows -
File1 -->
col_11 | col_11
col_12 | col_12
col_13 | col_13
File2 -->
col_AA | col_BA
col_AB | col_BB
col_AC | col_BC
Merged file should as follows ->
col_11 | col_AA | col_BA
col_11 | col_AB | col_BB
col_11 | col_AC | col_BC
col_12 | col_AA | col_BA
col_12 | col_AB | col_BB
col_12 | col_AC | col_BC
col_13 | col_AA | col_BA
col_13 | col_AB | col_BB
col_13 | col_AC | col_BC
Basically, add first column in line 1 from file 1 to all lines of file 2, repeate it for each line in file1.
Appreciate the help.
Thanks !