Hi all,
I'm trying to use the join command to merge two files, but it's not finding lots of the matches.
I have three files in total:
When I do
I get:
Which is what I was expecting.
However when I do the same thing with File A and File C it misses lots of matches and I get:
(I know most of the list above are not matches in file A and C but note line 110_3, this is only the very top of these files, file A and C should have around 9000 matches and yet the output from join only lists ~80 despite me being able to see matches it's missing).
I'm newish to linux but this has worked for me for ages with no problems. I've tried re-doing the lists, changing the orders, checking everything I could think of but getting nowhere. Does anyone have any suggestion as to what is going wrong? Or even if someone could verify that this is not something that I'm doing wrong and that this is some unusual error that would at least make me feel better!!
Thanks
Last edited by vbe; 08-17-2014 at 02:18 PM..
Reason: code tags please
I was trying to merge the following two example files using their first field:
join -1 1 -2 1 file1 file 2
but nothing is produced. The expected result should be:
rs1005152 7 q21.3 3
It appears that the length of the first field in file1 is causing the problem. Any suggesting on how to... (12 Replies)
Hi GUYS sorry for putting simple query. I have tried the methods posted previously in this site but I'm unable to join the similar values in different columns of different files.
I used sort -u file1 and join but no use.??
I'm attaching my inputfiles.Plz chek them
I have two files.
1st file... (10 Replies)
example sql:
select a.a1,b.b1,c.c1,d.d1,e.e1
from a
left outer join b on a.x=b.x
left outer join c on b.y=c.y
left outer join d on d.z=a.z
inner join a.t=e.t
I know how single outer or inner join works in sql.
But I don't really understand when there are multiple of them.
can... (0 Replies)
Hello,
My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns:
File A: (tab-delimited)
PDB CHAIN Start End Fragment
1avq A 171 176 awyfan
1avq A 172 177 wyfany
1c7k A 2 7... (3 Replies)
So i'm currently working on a project where I'm attempting to display information of users from the /etc/passwd file and also another information file holding addition information about users.
Problem is I've been trying to join the two files together and have all of the information about each... (2 Replies)
Hi,
I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column).
I want to write a script to join the files by the first common column so that in the... (5 Replies)
Guys,
I want to join two files. You might have seen this many times. I just don't get the desired output.
Searching the forum, No proper links :(
Input:
File1
test1
test2
test3
File2
is bad
is not bad
Output Needed:
test1 is bad
test2 is bad (4 Replies)
Hi All,
I have 2 files where the first column of both the files have to be compared and if they match the first six columns of the first file to be extracted in the output file.
Format of files :
File1 : ${SHTEMP}NPBR5.XTR.tmp
S00016678|129|7|MPF|20090106|E... (3 Replies)
I want to join two files , with file 1 col 3 and file 2 col 1 as key.
The join command is erratic for some reason. File 2 is a master file having all the names, and file 1 has some values. I want to add the names from fil2 in file 1. If I use the original master file, some output is missing.
... (16 Replies)
Hello All,
I'm working on a Shell script to join data from two files using Join command but not able to get the desired output as its throwing me an error:
I have sorted the two files on the Column 1 numerically which is used as Join clause
File 1:
1,ABC,GGG,20160401
2,XYZ,KKK,20160401... (2 Replies)