I've read a bit about awk
. It's proven to be extremely useful for single data Suppose I have two input files:
## inp1
x y
1 3
2 4
6 9
...
## inp2
x z
1 5
2 19
6 9
I want to output something that 'combines' both files. Something like:
## output
x y z
1 3 5
2 4 19
6 9 9
I can think of ideas like interleaving these two files, like this: https://stackoverflow.com/questions/4011814/how-to-interleave-lines-from-two-text-files and doing something with awk.
Or maybe something using associative arrays? I'm not too sure however, which is the reason for this question ;).
I am using Linux.
x
column (or should it be the first column, regardless of the header?). I hope I am not being pedant, but I think otherwise the problem is not quite defined.