0
I have two files with one common column that is redundant.File 1 has chromosomal locations and TF's, file 2 has chromosomal locations and Refseq numbers.
File 1:
chr1:66997824-67000456 ZNF333
chr1:66997824-67000456 EGR1
chr1:66997824-67000456 MZF-1
chr22:51221989-51222166 Zic2
chr22:51221989-51222166 ZF5
File 2:
chr1:66997824-67000456 Refseq#1
chr22:51221989-51222166 Refseq#22
I would like to merge these two files, and create a new file with three columns,
chr1:66997824-67000456 ZNF333 Refseq#1
chr1:66997824-67000456 EGR1 Refseq#1
chr1:66997824-67000456 MZF-1 Refseq#1
chr22:51221989-51222166 Zic2 Refseq#22
chr22:51221989-51222166 ZF5 Refseq#22
Since the chromosomal locations are redundant, I could not merge them using join in Unix - Is there a way to merge using sed or awk?
Please take a look at editing-help.
– Cyrus – 2015-10-31T16:08:14.447Try join command. – 2991ambusher – 2015-10-31T16:17:03.830