Hi! Basically, I have 2 text files and need to combine them into one while making a few changes. The commands I came up with were too long/slow so I figured some more familiar with awk could help me.
Basically I have these 2 files, were N~50000 :
file1.res
1 a1 a2 ... a13
2 b1 b2 ... b13
.
.
.
N x1 x2 ... x13
and file2.res
1 aa1 aa2 ... aa13
2 bb1 bb2 ... bb13
.
.
.
N xx1 xx2 ... xx13
I need an output file of the form:
x1 a1 aa1 b1 bb1 ... x1 xx1
x2 a2 aa2 b2 bb2 ... x2 xx2
.
.
x13 a13 aa13 b13 bb13 ... x13 xx13
I manage to do it using intermediate files, but for really big N that's most inconvenient, so can anyone see a one-liner for this one?
Basically I have these 2 files, were N~50000 :
file1.res
1 a1 a2 ... a13
2 b1 b2 ... b13
.
.
.
N x1 x2 ... x13
and file2.res
1 aa1 aa2 ... aa13
2 bb1 bb2 ... bb13
.
.
.
N xx1 xx2 ... xx13
I need an output file of the form:
x1 a1 aa1 b1 bb1 ... x1 xx1
x2 a2 aa2 b2 bb2 ... x2 xx2
.
.
x13 a13 aa13 b13 bb13 ... x13 xx13
I manage to do it using intermediate files, but for really big N that's most inconvenient, so can anyone see a one-liner for this one?