Hello,
I am using join to merge two files together. The defaults usually works great
join file1 file2
However, sometimes file1 or file2 has more keys, which I want to keep.
file 1:
-1 z
0 a
1 b
2 c
file 2:
0 a2
1 b2
2 c2
3 c3
So I do
join -a1 -a2 file1 file2
But then you don't know if the value is from file1 or file2
The following works for the above example (I will delimit with spaces later)
join -a1 -a2 -o 0 1.2 2.2 file1 file2
But let's say I have 100 columns in each file. How do I keep them all without manually specifying 1.2 1.3 1.4 ... ?
Thanks in advance!
Ayu