I have two files which are in same order and they have the same number of rows:
file1(only 2 columns):
562_201 RIR1
562_202 RIR1
562_203 RIR1
562_204 RIR1
562_205 RIR1
562_206 RIR1
562_207 RIR1
562_208 RIR1
562_209 RIR1
562_210 WR1
562_211 WR1
562_212 WR1
file2 (I should say that file2 has more than million rows!):
562_201 0101
562_202 0101
562_203 0101
562_204 0101
562_205 0101
562_206 0101
562_207 0101
562_208 0101
562_209 0101
562_210 0101
562_211 0101
562_212 0101
and I want to merge them to get:
562_201 RIR1 0101
562_202 RIR1 0101
562_203 RIR1 0101
562_204 RIR1 0101
562_205 RIR1 0101
562_206 RIR1 0101
562_207 RIR1 0101
562_208 RIR1 0101
562_209 RIR1 0101
562_210 WR1 0101
562_211 WR1 0101
562_212 WR1 0101
thanks!
You can use join
command:
$ join file1.txt file2.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With