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.
For example Medtr1g004990 exists in the master file but does not come in the output.
However, if just use a truncated master file that has 5 records including Medtr1g004990, the output seems to be correct.
I have used sorted files also , same problem. Please help solve this, if join doesnt work,please let me know if some similar command to join would.
I have attached the original master file and pasted the truncated one.
File 1
File 2 (truncated from attached file)
Command and output with master file
Thanks, sorting solves the problem. I was previously sorting with -k3,3 which doesnt work but -k3 works.
Actually another problem is with some of the data.
Some of the key field in file 1 are concatenated by a comma
For example
Code:
XLOC_017038 XLOC_017038 Medtr3g056615,Medtr3g056620 chr3:22631993-22636677 q1 q2 OK 0.588602 0.125583 -2.22866 -2.09056 0.0099 0.0372138 yes up
which actually has Medtr3g056615 and Medtr3g056620 , is it possible to look up both names from the master file and output names separated by a '"," ?
The corresponding entries in the master files are
Code:
Medtr3g056615 NB-ARC domain disease resistance protein
Medtr3g056620 NB-ARC domain disease resistance protein
So the output for these lines should be
Code:
Medtr3g056615,Medtr3g056620 XLOC_017038 XLOC_017038 chr3:22631993-22636677 q1 q2 OK 0.588602 0.125583 -2.22866 -2.09056 0.0099 0.0372138 yes up NB-ARC domain disease resistance protein,NB-ARC domain disease resistance protein
Don't remove anything, it needs the code as presented. Nothing is missing in that line which uses a conditional assignment; it appends the T[I[i]] array elements to the new last field $n.
Test the code with a small subset of both files; come back with error msgs on failure.
I'm using an Ubuntu machine and expansion is not working properly. What would cause this? Do I need to check for any particular bash packages?
$ ipcs -m | grep $USER | awk '{printf "%s ",$2}'
$ ipcs -m | grep UNF | awk '{printf "%s ",$2}'
294912 1048577 425986 688131 786436 1245189... (14 Replies)
Hi There,
---------
file1
-------
~c asd@ac.com
--------------
Now i am using below command
cat file1|mailx -s " testing" -r " My Name" abc@tech.com (3 Replies)
Hi,
I am trying to enable rexec to automate certain tasks(it has to be rexec, not ssh or any other due to the system environment), so after switching to linux, I followed the certain instructions that were laid out in the web.
My operating system is fedora 17, so I first installed the... (1 Reply)
I am using mailx command in my script to attach a file and send an email. I need to attach a csv file and send email to a mail id -
I am using
uuencode output.csv output.csv | mailx -s "test mail" xyz@abc.com
This will send a mail with scrambled text in body.
am i missing something ?... (4 Replies)
Hi All,
Can any one help me to solve the issue.
The Issue is, i have started the sendmail service on my RHEL 4 update 6 box, I am able to send the mail from my box to almost all of the Email Id's except few.
Exampe,
test mail.
.
Output is :the message is sent.
now if I send the... (2 Replies)
Hi all,
I'm trying to generate a series of txt files starting from a plain csv file
part of my code:
#!/bin/ksh
INSTALLDIR=/Users/ME/Installdir
CSV=CSV.csv
TMP=/tmp/$(basename $0).txt
tr -s "\r" "\n" < /$INSTALLDIR/$CSV > $TMP
function Makefiles
{
printf '%24s:%30s\n' "sometext"... (1 Reply)
Hi
I've a problem with Hp-ux 11.11 9000/800/rp3440 system. Already the software for driver & its patch are loaded for HBA Fibrechannel card, but still the fibrechannel card is showing the status "Unclaimed" . What will be reason for this? How to get the status "Claimed" ?
Pl. help me out.... (4 Replies)
Hello Again,
Those that have noticed my earlier posts will know that I have succesfully installed Solaris 8 onto my pc. I haven't been able to get x-server working (i think it doesn't like my video card) though I've been able to log into root (with a bit of help from unix forums :o ) and have... (2 Replies)